pentaho/pentaho-kettle · error · KettleException
\nFailed to update object, error message was: \n
Error message
\nFailed to update object, error message was: \n
What it means
In SalesforceUpdate.flushBuffers(), when the batch update call itself throws (connection error, SOAP fault, anything before SaveResults are produced) and the step is NOT configured for error handling, it throws KettleException('\\nFailed to update object, error message was: \\n' + e.getMessage()). If error handling IS enabled, the row is instead routed to the error stream. This signals the entire Salesforce update call failed, not a single record.
Solutions
- Read the message after 'error message was:' — it carries the underlying connection/SOAP error.
- Test the Salesforce connection from the step dialog (Test connection) and re-enter the security token if the password changed.
- Reduce the batch size in the step settings to avoid oversized/timeout-prone requests.
- Enable error handling on the step so failed rows go to an error stream rather than killing the transformation.
Defensive patterns
Strategy: retry
Validate before calling
// Verify endpoint reachability before running
try {
HttpURLConnection c = (HttpURLConnection) new URL(endpointUrl).openConnection();
c.setConnectTimeout(5000);
if (c.getResponseCode() >= 500) throw new IllegalStateException("Salesforce endpoint unhealthy");
} catch (IOException e) {
throw new IllegalStateException("Cannot reach Salesforce endpoint", e);
} Try / catch
try {
trans.execute(null);
trans.waitUntilFinished();
} catch (KettleException e) {
if (e.getMessage().contains("Failed to update object")) {
// transient Salesforce/network failure: back off and retry the transformation
}
} Prevention
- Re-test the Salesforce connection after any password/security-token change.
- Reduce batchSize to lower request size and timeout risk.
- Ensure firewalls/proxies allow the Salesforce endpoint (login.salesforce.com / *.salesforce.com).
- Enable error handling so failed rows go to an error stream instead of aborting the run.
When it happens
Trigger: data.sf.update(...) (or equivalent batch call) throwing an exception: unreachable Salesforce endpoint, invalid session/login, SOAP connection reset, oversized batch, or API version incompatibility.
Common situations: Firewall/proxy blocking the Salesforce endpoint; expired password changed by admin invalidating the security token; batchSize too large causing timeouts; wrong API URL configured in the connection dialog.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- SalesforceInput.Error.Connection
- Failed in writeToSalesForce:
- Failed to open SFTP session
- HTTPPOST.Error.CanNotReadURL
- JobFTPS.Error.Connecting
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/fb9d6ae1a94ad235.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupdate/SalesforceUpdate.java:249
// Simply add this row to the error row
if ( log.isDebug() ) {
logDebug( "Passing row to error step" );
}
putError( getInputRowMeta(), data.outputBuffer[j], 1, errorMessage, null, "SalesforceUpdate001" );
}
}
// reset the buffers
data.sfBuffer = new SObject[meta.getBatchSizeInt()];
data.outputBuffer = new Object[meta.getBatchSizeInt()][];
data.iBufferPos = 0;
} catch ( Exception e ) {
if ( !getStepMeta().isDoingErrorHandling() ) {
throw new KettleException( "\nFailed to update object, error message was: \n" + e.getMessage() );
}
// Simply add this row to the error row
if ( log.isDebug() ) {
logDebug( "Passing row to error step" );
}
for ( int i = 0; i < data.iBufferPos; i++ ) {
putError( data.inputRowMeta, data.outputBuffer[i], 1, e.getMessage(), null, "SalesforceUpdate002" );
}
} finally {
if ( data.saveResult != null ) {
data.saveResult = null;
}
}
}View on GitHub (pinned to f3058517a1)