pentaho/pentaho-kettle · error · KettleStepException

SalesforceUpsert.log.Exception

Error message

SalesforceUpsert.log.Exception

What it means

Generic wrapper in SalesforceUpsert.processRow: any exception thrown by writeToSalesForce is caught and rethrown as a KettleStepException with this message and the original cause attached. It marks the step as failed for the current row batch; the specific root cause is in the chained exception.

Solutions

  1. Inspect the chained cause (e.getCause()) for the actual Salesforce/transport error.
  2. Verify Salesforce connectivity, credentials, and that the API endpoint is reachable.
  3. Re-run the transformation after any transient network/Salesforce outage.
  4. If data-driven, fix the offending records and enable error handling on the step to route bad rows instead of failing.

Example fix

// before
// step fails on first transient Salesforce hiccup
// after: configure retry / error handling
stepMeta.setDoingErrorHandling(true); // route failed rows to an error stream and retry transient failures
Defensive patterns

Strategy: retry

Validate before calling

// verify Salesforce session before running
if (!connectionManager.verifyConnection()) { connectionManager.renewSession(); }

Try / catch

try { writeToSalesForce(rowData); } catch (KettleStepException e) { Throwable root = e; while (root.getCause() != null) root = root.getCause(); log.error("Salesforce write failed: " + root.getMessage()); if (isTransient(root)) retry(rowData, 3); else throw e; }

Prevention

When it happens

Trigger: writeToSalesForce throws — Salesforce login/API failure, connection problems, SOAP marshalling errors, or a KettleException raised inside buffer flushing during processRow.

Common situations: Expired Salesforce session mid-run; network outage during upsert; invalid SObject data causing the WS client to fail; Salesforce API maintenance window.

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


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

Appendix: source

Thrown at plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupsert/SalesforceUpsert.java:113

      data.outputRowMeta = data.inputRowMeta.clone();
      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,
                      metaStore );

      // Build the mapping of input position to field name
      data.fieldnrs = new int[meta.getUpdateStream().length];
      for ( int i = 0; i < meta.getUpdateStream().length; i++ ) {
        data.fieldnrs[i] = getInputRowMeta().indexOfValue( meta.getUpdateStream()[i] );
        if ( data.fieldnrs[i] < 0 ) {
          throw new KettleException( BaseMessages.getString( PKG, "SalesforceUpsert.FieldNotFound", meta
            .getUpdateStream()[i] ) );
        }
      }
    }

    try {
      writeToSalesForce( outputRowData );
    } catch ( Exception e ) {
      throw new KettleStepException( BaseMessages.getString( PKG, "SalesforceUpsert.log.Exception" ), e );
    }
    return true;
  }

  @VisibleForTesting
  void writeToSalesForce( Object[] rowData ) throws KettleException {
    try {

      if ( log.isDetailed() ) {
        logDetailed( BaseMessages.getString( PKG, "SalesforceUpsert.CalledWrite", data.iBufferPos, meta
          .getBatchSizeInt() ) );
      }
      // if there is room in the buffer
      if ( data.iBufferPos < meta.getBatchSizeInt() ) {
        // Reserve for empty fields
        ArrayList<String> fieldsToNull = new ArrayList<String>();
        ArrayList<XmlObject> upsertfields = new ArrayList<>();

View on GitHub (pinned to f3058517a1)