{"record":{"id":"bb02ec6eb780f65a","repo":"pentaho/pentaho-kettle","slug":"salesforceupdate-log-exception","errorCode":null,"errorMessage":"SalesforceUpdate.log.Exception","messagePattern":"SalesforceUpdate\\.log\\.Exception","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupdate/SalesforceUpdate.java","lineNumber":104,"sourceCode":"      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n                      metaStore );\n\n      // Build the mapping of input position to field name\n      data.fieldnrs = new int[meta.getUpdateStream().length];\n      for ( int i = 0; i < meta.getUpdateStream().length; i++ ) {\n        data.fieldnrs[i] = getInputRowMeta().indexOfValue( meta.getUpdateStream()[i] );\n        if ( data.fieldnrs[i] < 0 ) {\n          throw new KettleException( \"Field [\" + meta.getUpdateStream()[i]\n              + \"] couldn't be found in the input stream!\" );\n        }\n      }\n    }\n\n    try {\n      writeToSalesForce( outputRowData );\n\n    } catch ( Exception e ) {\n      throw new KettleStepException( BaseMessages.getString( PKG, \"SalesforceUpdate.log.Exception\" ), e );\n    }\n    return true;\n  }\n\n  @VisibleForTesting\n    void writeToSalesForce( Object[] rowData ) throws KettleException {\n    try {\n\n      if ( log.isDetailed() ) {\n        logDetailed( \"Called writeToSalesForce with \" + data.iBufferPos + \" out of \" + meta.getBatchSizeInt() );\n      }\n\n      // if there is room in the buffer\n      if ( data.iBufferPos < meta.getBatchSizeInt() ) {\n        // Reserve for empty fields\n        ArrayList<String> fieldsToNull = new ArrayList<String>();\n        ArrayList<XmlObject> updatefields = new ArrayList<>();\n","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupdate/SalesforceUpdate.java#L86-L122","documentation":"SalesforceUpdate.processRow() calls writeToSalesForce(outputRowData) inside a try/catch and rethrows any exception as a KettleStepException with the localized message key 'SalesforceUpdate.log.Exception'. It is the outer wrapper: whatever failed inside the Salesforce write (connection, batch flush, API error) surfaces here wrapped as a step exception that stops the transformation.","triggerScenarios":"Any exception escaping writeToSalesForce during normal row processing: Salesforce connection failures, batch flush errors (see flushBuffers), or NPEs inside the write logic.","commonSituations":"Expired/invalid Salesforce credentials mid-run; network outage during the update batch; an earlier KettleException raised in flushBuffers propagating through this wrapper.","solutions":["Look at the chained cause — the actionable error is almost always inside writeToSalesForce/flushBuffers.","Verify Salesforce connectivity and credentials (endpoint, username/password/token).","Enable error handling on the step if you want rows routed to an error stream instead of aborting the transformation.","Fix the root cause indicated by the inner exception (e.g. field errors from 3747/3748)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  trans.execute(null);\n  trans.waitUntilFinished();\n} catch (KettleStepException e) {\n  log.error(\"Salesforce write failed: {}\", e.getCause() != null ? e.getCause().toString() : e.getMessage(), e);\n  // inspect the chained cause to find the real failure (connection, flush, API error)\n}","preventionTips":["Always log the chained cause — this exception is only a wrapper.","Configure step error handling to divert bad rows instead of aborting.","Monitor Salesforce connectivity/token validity for long-running jobs.","Test the Salesforce connection in the step dialog before scheduling."],"tags":["kettle","salesforce","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"}