pentaho/pentaho-kettle · error · KettleException

SalesforceInput.ErrorUpdate

Error message

SalesforceInput.ErrorUpdate

What it means

KettleException thrown by SalesforceConnection.update() when the SOAP update() call fails. The exception text is embedded in the message. Each SObject must carry a valid Id; transport or API rejection of the batch raises this error.

Solutions

  1. Read the embedded Salesforce fault — INVALID_FIELD/INVALID_ID point to the record Id or field issue
  2. Verify every SObject Id is a valid, existing 18-char Salesforce Id
  3. Check Update object permission and field-level update access for the integration user
  4. Review org validation rules / triggers that may reject the new values
  5. Retry with smaller batches to work around record-lock contention

Example fix

// before
SObject o = new SObject(); o.setType("Account"); o.setField("Name","X"); // no Id
connection.update(new SObject[]{o});
// after
SObject o = new SObject(); o.setType("Account"); o.setId("001XXXXXXXXXXXXAAA"); o.setField("Name","X");
connection.update(new SObject[]{o});
Defensive patterns

Strategy: validation

Validate before calling

boolean updatable = Arrays.stream(sfBuffer).allMatch(o -> o != null && o.getId() != null && o.getId().matches("[a-zA-Z0-9]{15,18}")); if (!updatable) throw new IllegalArgumentException("Every SObject needs a valid Salesforce Id before update()");

Type guard

boolean hasValidIds(SObject[] buf) { return buf != null && Arrays.stream(buf).allMatch(o -> o.getId() != null && o.getId().length() >= 15); }

Try / catch

try { results = connection.update(buffer); } catch (KettleException e) { log.logError("Update failed: " + e.getMessage(), e); throw e; } // fault text is in e.getMessage()

Prevention

When it happens

Trigger: Calling update(sfBuffer) when the binding's update() throws: SObjects without valid Salesforce record Ids, invalid session, field values failing validation rules, or permission errors.

Common situations: Updating records deleted by another process (INVALID_ID), missing Update permission, validation rules rejecting new field values, malformed date/number formats in changed fields.

Related errors


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

Appendix: source

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

  public SaveResult[] insert( SObject[] sfBuffer ) throws KettleException {
    try {
      List<SObject> normalizedSfBuffer = new ArrayList<>();
      for ( SObject part : sfBuffer ) {
        if ( part != null ) {
          normalizedSfBuffer.add( part );
        }
      }
      return getBinding().create( normalizedSfBuffer.toArray( new SObject[normalizedSfBuffer.size()] ) );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "SalesforceInput.ErrorInsert", e ) );
    }
  }

  public SaveResult[] update( SObject[] sfBuffer ) throws KettleException {
    try {
      return getBinding().update( sfBuffer );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "SalesforceInput.ErrorUpdate", e ) );
    }
  }

  public DeleteResult[] delete( String[] id ) throws KettleException {
    try {
      return getBinding().delete( id );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "SalesforceInput.ErrorDelete", e ) );
    }
  }

  public static XmlObject createMessageElement( String name, Object value, boolean useExternalKey ) throws Exception {

    XmlObject me = null;

    if ( useExternalKey ) {
      // We use an external key
      // the structure should be like this :

View on GitHub (pinned to f3058517a1)