{"record":{"id":"840c7a25e9378d4b","repo":"pentaho/pentaho-kettle","slug":"salesforcedelete-log-exception","errorCode":null,"errorMessage":"SalesforceDelete.log.Exception","messagePattern":"SalesforceDelete\\.log\\.Exception","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforcedelete/SalesforceDelete.java","lineNumber":90,"sourceCode":"      // Check deleteKeyField\n      String realFieldName = environmentSubstitute( meta.getDeleteField() );\n      if ( Utils.isEmpty( realFieldName ) ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"SalesforceDelete.Error.DeleteKeyFieldMissing\" ) );\n      }\n\n      // return the index of the field in the input stream\n      data.indexOfKeyField = getInputRowMeta().indexOfValue( realFieldName );\n      if ( data.indexOfKeyField < 0 ) {\n        // the field is unreachable!\n        throw new KettleException( BaseMessages.getString(\n          PKG, \"SalesforceDelete.Error.CanNotFindFDeleteKeyField\", realFieldName ) );\n      }\n    }\n\n    try {\n      writeToSalesForce( outputRowData );\n    } catch ( Exception e ) {\n      throw new KettleStepException( BaseMessages.getString( PKG, \"SalesforceDelete.log.Exception\" ), e );\n    }\n    return true;\n  }\n\n  private void writeToSalesForce( Object[] rowData ) throws KettleException {\n    try {\n\n      if ( log.isDetailed() ) {\n        logDetailed( BaseMessages.getString( PKG, \"SalesforceDelete.Log.WriteToSalesforce\", data.iBufferPos, meta\n          .getBatchSizeInt() ) );\n      }\n\n      // if there is room in the buffer\n      if ( data.iBufferPos < meta.getBatchSizeInt() ) {\n\n        // Load the buffer array\n        data.deleteId[data.iBufferPos] = getInputRowMeta().getString( rowData, data.indexOfKeyField );\n        data.outputBuffer[data.iBufferPos] = rowData;","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforcedelete/SalesforceDelete.java#L72-L108","documentation":"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).","triggerScenarios":"Any exception thrown by writeToSalesForce during processRow — e.g. connection errors, delete API failures, or buffer flush errors from Salesforce.","commonSituations":"Salesforce service outage or timeout during the delete; expired/invalid session mid-transformation; the chained cause from Error.WriteToSalesforce or FailedToDeleted surfacing here.","solutions":["Inspect the chained cause (getCause()) to find the real failure — usually a Salesforce API error","Verify Salesforce connectivity and credentials before running the transformation","Check the Salesforce Delete step's error handling settings; with error handling enabled failures are routed to an error stream instead","Retry the transformation; if it is a transient Salesforce error, reduce batch size and re-run"],"exampleFix":"null","handlingStrategy":"try-catch","validationCode":"// ensure connectivity before running the step\nconnection.connect();\nif (!connection.isConnected()) { throw new IllegalStateException(\"Salesforce not connected before delete\"); }","typeGuard":null,"tryCatchPattern":"try {\n  executeTransformation();\n} catch (KettleStepException e) {\n  Throwable cause = e.getCause();\n  logError(\"writeToSalesForce failed: \" + (cause != null ? cause.getMessage() : e.getMessage()));\n  // act on the root cause, not the wrapper\n  throw e;\n}","preventionTips":["Always inspect getCause() — this error is only a wrapper","Validate Salesforce credentials and session before long-running transformations","Configure error handling so transient row failures don't abort the whole run","Monitor Salesforce API status during transformation windows"],"tags":["salesforce","delete","wrapper-exception","step-execution"],"backgroundTag":"api-request-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}