pentaho/pentaho-kettle · error · KettleException
SalesforceUpdate.Error.FlushBuffer
Error message
SalesforceUpdate.Error.FlushBuffer
What it means
In SalesforceUpdate.flushBuffers(), after calling Salesforce update() the step inspects each SaveResult. If a result reports failure and the step is not in error-handling mode, it throws a KettleException keyed 'SalesforceUpdate.Error.FlushBuffer' with the row index, the first error's StatusCode, and its message. This is Salesforce rejecting one or more records in the committed batch.
Solutions
- Read the StatusCode and message embedded in the exception — it names the exact Salesforce field and problem.
- Fix the offending data in the stream (bad Id, null on a required field, value failing a validation rule).
- Enable step error handling to route failed records to an error stream instead of aborting the batch.
- Check field-level security/permissions on the Salesforce object for the integration user.
Example fix
// before: invalid 15/18-char Id passed in the stream row[0] = "12345"; // not a valid Salesforce Id // after: use a full record Id fetched from Salesforce row[0] = "001XXXXXXXXXXXXXXX";
Defensive patterns
Strategy: try-catch
Validate before calling
// Validate Salesforce Id format before sending
if (idField != null && !idField.matches("^[a-zA-Z0-9]{15}(?:[a-zA-Z0-9]{3})?$")) {
throw new IllegalArgumentException("Invalid Salesforce Id: " + idField);
} Try / catch
try {
trans.execute(null);
} catch (KettleException e) {
// 'SalesforceUpdate.Error.FlushBuffer ... <rowIndex> <StatusCode> <message>'
// route failed rows to an error stream by enabling error handling on the step
log.error("Salesforce rejected record: {}", e.getMessage());
} Prevention
- Pre-validate record Ids and required fields in the stream before updating.
- Enable step error handling so one bad record doesn't abort the batch.
- Check Salesforce validation rules and field-level security for the integration user.
- Keep external-ID field settings consistent with the actual schema.
When it happens
Trigger: data.saveResult[j].getSuccess() is false: Salesforce rejected record j of the batch — e.g. invalid field value, missing required field, record locked, INVALID_FIELD / MALFORMED_ID status codes returned by the partner API.
Common situations: Updating a record with an invalid Id format; writing a value that violates a Salesforce validation rule; insufficient field-level security; updating a required field with null.
Related errors
- Erreur getting fields from module [
- Error getting fields from module [
- Failed in writeToSalesForce:
- Field [ ] couldn't be found in the input stream!
- \nFailed to update object, error message was: \n
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/456eaa53a127a5a1.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupdate/SalesforceUpdate.java:218
if ( log.isDetailed() ) {
logDetailed( BaseMessages.getString( PKG, "SalesforceUpdate.log.LineRow", "" + getLinesInput() ) );
}
}
} else {
// there were errors during the create call, go through the
// errors
// array and write them to the screen
if ( !getStepMeta().isDoingErrorHandling() ) {
if ( log.isDetailed() ) {
logDetailed( "Found error from SalesForce and raising the exception" );
}
// Only send the first error
//
com.sforce.soap.partner.Error err = data.saveResult[j].getErrors()[0];
throw new KettleException( BaseMessages.getString( PKG, "SalesforceUpdate.Error.FlushBuffer", new Integer(
j ), err.getStatusCode(), err.getMessage() ) );
}
String errorMessage = "";
for ( int i = 0; i < data.saveResult[j].getErrors().length; i++ ) {
// get the next error
com.sforce.soap.partner.Error err = data.saveResult[j].getErrors()[i];
errorMessage +=
BaseMessages.getString( PKG, "SalesforceUpdate.Error.FlushBuffer", new Integer( j ), err
.getStatusCode(), err.getMessage() );
}
// 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" );View on GitHub (pinned to f3058517a1)