pentaho/pentaho-kettle · error · KettleException

SalesforceInput.ErrorGettingObject

SalesforceInput.ErrorGettingObject

Error message

SalesforceInput.ErrorGettingObject

What it means

In query(), when not using a custom SQL query, the code describes the configured module (SObject) and throws this KettleException if Salesforce returns a null DescribeSObjectResult. It means the object definition could not be retrieved for the given module name.

Solutions

  1. Correct the module/SObject name in the Salesforce Input step (include __c for custom objects).
  2. Verify in Salesforce Setup > Objects that the object exists and its API name matches.
  3. Grant the integration user read/field permissions and API access on the object.
  4. Log the module string right before query() to catch whitespace or case issues.

Example fix

// before
conn.setModule("Account Custom"); // not a valid API name
// after
conn.setModule("Account_Custom__c");
Defensive patterns

Strategy: validation

Validate before calling

// Pre-validate the SObject API name before query()
if (module == null || module.isBlank()) throw new IllegalArgumentException("module required");
// Optionally describe first to confirm existence

Try / catch

try {
  conn.query(false);
} catch (KettleException e) {
  if (e.getMessage().contains("ErrorGettingObject")) {
    logError("Cannot describe object " + conn.getModule() + " - check API name/permissions");
  }
  throw e;
}

Prevention

When it happens

Trigger: query(specifyQuery=false) where getBinding().describeSObject(getModule()) returns null — typically an unknown/misspelled object name.

Common situations: Typo in the Salesforce object/table name; custom object name missing its __c suffix; object not visible to the integration user (API access or permissions).

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/42aaff8d40e67b8c. Report an issue: GitHub.

Appendix: source

Thrown at plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforce/SalesforceConnection.java:392

      }
      throw new KettleException( BaseMessages.getString( PKG, "SalesforceInput.Error.Connection" ), ex );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "SalesforceInput.Error.Connection" ), e );
    }
  }

  public void query( boolean specifyQuery ) throws KettleException {

    if ( getBinding() == null ) {
      throw new KettleException( BaseMessages.getString( PKG, "SalesforceInput.Exception.CanNotGetBiding" ) );
    }

    try {
      if ( !specifyQuery ) {
        // check if we can query this Object
        DescribeSObjectResult describeSObjectResult = getBinding().describeSObject( getModule() );
        if ( describeSObjectResult == null ) {
          throw new KettleException( BaseMessages.getString( PKG, "SalesforceInput.ErrorGettingObject" ) );
        }
        if ( !describeSObjectResult.isQueryable() ) {
          throw new KettleException( BaseMessages.getString(
            PKG, "SalesforceInputDialog.ObjectNotQueryable", module ) );
        }
        if ( this.recordsFilter == SalesforceConnectionUtils.RECORDS_FILTER_UPDATED
          || this.recordsFilter == SalesforceConnectionUtils.RECORDS_FILTER_DELETED ) {
          // The object must be replicateable
          if ( !describeSObjectResult.isReplicateable() ) {
            throw new KettleException( BaseMessages.getString(
              PKG, "SalesforceInput.Error.ObjectNotReplicateable", getModule() ) );
          }
        }
      }

      if ( getSQL() != null && log.isDetailed() ) {
        log.logDetailed( BaseMessages.getString( PKG, "SalesforceInput.Log.SQLString" ) + " : " + getSQL() );
      }

View on GitHub (pinned to f3058517a1)