pentaho/pentaho-kettle · error · KettleStepException

SalesforceDelete.log.Exception

Error message

SalesforceDelete.log.Exception

What it means

processRow wraps the call to writeToSalesForce in a try/catch and rethrows any failure as a KettleStepException with this generic message, preserving the original cause. It is a wrapper error: the real problem is in the chained exception (usually a Salesforce API or buffer-flush failure).

Solutions

  1. Inspect the chained cause (getCause()) to find the real failure — usually a Salesforce API error
  2. Verify Salesforce connectivity and credentials before running the transformation
  3. Check the Salesforce Delete step's error handling settings; with error handling enabled failures are routed to an error stream instead
  4. Retry the transformation; if it is a transient Salesforce error, reduce batch size and re-run

Example fix

null
Defensive patterns

Strategy: try-catch

Validate before calling

// ensure connectivity before running the step
connection.connect();
if (!connection.isConnected()) { throw new IllegalStateException("Salesforce not connected before delete"); }

Try / catch

try {
  executeTransformation();
} catch (KettleStepException e) {
  Throwable cause = e.getCause();
  logError("writeToSalesForce failed: " + (cause != null ? cause.getMessage() : e.getMessage()));
  // act on the root cause, not the wrapper
  throw e;
}

Prevention

When it happens

Trigger: Any exception thrown by writeToSalesForce during processRow — e.g. connection errors, delete API failures, or buffer flush errors from Salesforce.

Common situations: Salesforce service outage or timeout during the delete; expired/invalid session mid-transformation; the chained cause from Error.WriteToSalesforce or FailedToDeleted surfacing here.

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/840c7a25e9378d4b. Report an issue: GitHub.

Appendix: source

Thrown at plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforcedelete/SalesforceDelete.java:90

      // Check deleteKeyField
      String realFieldName = environmentSubstitute( meta.getDeleteField() );
      if ( Utils.isEmpty( realFieldName ) ) {
        throw new KettleException( BaseMessages.getString( PKG, "SalesforceDelete.Error.DeleteKeyFieldMissing" ) );
      }

      // return the index of the field in the input stream
      data.indexOfKeyField = getInputRowMeta().indexOfValue( realFieldName );
      if ( data.indexOfKeyField < 0 ) {
        // the field is unreachable!
        throw new KettleException( BaseMessages.getString(
          PKG, "SalesforceDelete.Error.CanNotFindFDeleteKeyField", realFieldName ) );
      }
    }

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

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

      if ( log.isDetailed() ) {
        logDetailed( BaseMessages.getString( PKG, "SalesforceDelete.Log.WriteToSalesforce", data.iBufferPos, meta
          .getBatchSizeInt() ) );
      }

      // if there is room in the buffer
      if ( data.iBufferPos < meta.getBatchSizeInt() ) {

        // Load the buffer array
        data.deleteId[data.iBufferPos] = getInputRowMeta().getString( rowData, data.indexOfKeyField );
        data.outputBuffer[data.iBufferPos] = rowData;

View on GitHub (pinned to f3058517a1)