pentaho/pentaho-kettle · error · KettleException

SalesforceInput.Error.GettingModuleFields

Error message

SalesforceInput.Error.GettingModuleFields

What it means

KettleException thrown when describeSObject() (field metadata retrieval for the current module) fails. The message key 'SalesforceInput.Error.GettingModuleFields' includes the module name and the underlying cause. It wraps both the SOAP call failure and any other exception raised while resolving the object's fields.

Solutions

  1. Check the cause: INVALID_FIELD / Entity type does not exist means fix the object name in the step settings
  2. Re-connect if the session expired, then retry getFields()
  3. Verify the integration user can read/describe the object (object permissions, API enabled)
  4. Confirm the object still exists in the org and its API name matches exactly (case-sensitive custom objects end in __c)
  5. Align the configured Salesforce API version with the org

Example fix

// before
connection.setModule("Accout__c");
String[] fields = connection.getFields();
// after
connection.setModule("Account__c"); // correct API name
String[] fields = connection.getFields();
Defensive patterns

Strategy: validation

Validate before calling

String apiName = module == null ? null : module.trim(); if (apiName == null || apiName.isEmpty()) throw new IllegalArgumentException("Module name required before getFields()"); if (!connection.testConnection()) connection.connect();

Type guard

boolean moduleLooksValid(String m) { return m != null && m.matches("[A-Za-z][A-Za-z0-9_]*(__c)?"); }

Try / catch

try { fields = connection.getFields(module); } catch (KettleException e) { log.logError("Cannot describe " + module + ": " + e.getCause(), e); throw e; }

Prevention

When it happens

Trigger: describeSObject call failing for the configured module: invalid session, network error, object name typo / object deleted from org, or insufficient permission to describe the object. Note the non-queryable branch throws its own error (3714) before this wrap.

Common situations: Renamed or deleted custom object after the step was configured, API user lost read access to the object, expired session on a long-running transformation, wrong API version lacking the object.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


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

Appendix: source

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

  public Field[] getObjectFields( String objectName ) throws KettleException {
    DescribeSObjectResult describeSObjectResult = null;
    try {
      // Get object
      describeSObjectResult = getBinding().describeSObject( objectName );
      if ( describeSObjectResult == null ) {
        return null;
      }

      if ( !describeSObjectResult.isQueryable() ) {
        throw new KettleException( BaseMessages.getString(
          PKG, "SalesforceInputDialog.ObjectNotQueryable", this.module ) );
      } else {
        // we can query this object
        return describeSObjectResult.getFields();
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "SalesforceInput.Error.GettingModuleFields", this.module ), e );
    } finally {
      if ( describeSObjectResult != null ) {
        describeSObjectResult = null;
      }
    }
  }

  /**Returns only updatable object fields and ID field if <b>excludeNonUpdatableFields</b> is true,
   * otherwise all object field
   * @param objectName the name of Saleforce object
   * @param excludeNonUpdatableFields the flag that indicates if non-updatable fields should be excluded or not
   * @return the list of object fields depending on filter or not non-updatable fields.
   * @throws KettleException if any exception occurs
   */
  public Field[] getObjectFields( String objectName, boolean excludeNonUpdatableFields ) throws KettleException {
    Field[] fieldList = getObjectFields( objectName );
    if ( excludeNonUpdatableFields ) {

View on GitHub (pinned to f3058517a1)