pentaho/pentaho-kettle · error · KettleException
SalesforceInput.Error.GettingModules
Error message
SalesforceInput.Error.GettingModules
What it means
KettleException thrown by SalesforceConnection.getAllAvailableObjects() when the describeGlobal() metadata call or post-processing of its results fails. It is used to list all Salesforce object types (optionally only queryable ones) and rethrows with 'SalesforceInput.Error.GettingModules'. It means the global object metadata listing failed.
Solutions
- Verify the Salesforce user has 'API Enabled' permission and can access the org
- Re-connect to refresh an expired session before calling getAllAvailableObjects()
- Check the configured Salesforce API version matches one supported by the org
- Print the cause — a NullPointerException suggests an unexpected empty describeGlobal response; retry
- Confirm org edition supports the partner API (some stripped-down editions restrict it)
Example fix
// before String[] modules = connection.getAllAvailableObjects(true); // after if (!connection.testConnection()) connection.connect(); // refresh session first String[] modules = connection.getAllAvailableObjects(true);
Defensive patterns
Strategy: try-catch
Validate before calling
if (!connection.testConnection()) throw new IllegalStateException("Salesforce session not available before listing modules"); Type guard
String[] safeGetModules(Connection c) { try { return c.getAllAvailableObjects(true); } catch (Exception e) { return new String[0]; } } Try / catch
try { modules = connection.getAllAvailableObjects(true); } catch (KettleException e) { log.logError("describeGlobal failed: " + e.getCause(), e); throw e; } Prevention
- Ensure the Salesforce profile has 'API Enabled' and Metadata access
- Call testConnection() / reconnect before metadata calls
- Pin a supported Salesforce API version supported by the org
- Check org edition limitations on the partner API
When it happens
Trigger: describeGlobal() failing due to invalid session, network error, Salesforce API version mismatch, or the returned DescribeGlobalResult having no sObjects the code can iterate (NPE on null array).
Common situations: Integration user lacking API access (API disabled in profile), expired session before listing modules, custom Salesforce API version removed server-side, empty org metadata shape.
Understand the failure class
Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.
Related errors
- Erreur getting fields from module [
- Error getting fields from module [
- SalesforceConnection.Exception.Query
- SalesforceInput.Error.GettingModuleFields
- SalesforceInput.Error.QueringMore
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/860fe272bae83186.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforce/SalesforceConnection.java:705
DescribeGlobalSObjectResult[] sobjectResults = null;
try {
// Get object
dgr = getBinding().describeGlobal();
// let's get all objects
sobjectResults = dgr.getSobjects();
int nrObjects = dgr.getSobjects().length;
objects = new ArrayList<String>();
for ( int i = 0; i < nrObjects; i++ ) {
DescribeGlobalSObjectResult o = dgr.getSobjects()[i];
if ( ( OnlyQueryableObjects && o.isQueryable() ) || !OnlyQueryableObjects ) {
objects.add( o.getName() );
}
}
return objects.toArray( new String[objects.size()] );
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( PKG, "SalesforceInput.Error.GettingModules" ), e );
} finally {
if ( dgr != null ) {
dgr = null;
}
if ( objects != null ) {
objects.clear();
objects = null;
}
if ( sobjectResults != null ) {
sobjectResults = null;
}
}
}
public Field[] getObjectFields( String objectName ) throws KettleException {
DescribeSObjectResult describeSObjectResult = null;
try {
// Get objectView on GitHub (pinned to f3058517a1)