pentaho/pentaho-kettle · error · KettleStepException
ElasticSearchBulk.Log.Exception
ElasticSearchBulk.Log.Exception
Error message
ElasticSearchBulk.Log.Exception
What it means
ElasticSearchBulk.processRow rejects all incoming rows and throws a KettleStepException wrapping this message whenever any unexpected exception occurs while processing a row against Elasticsearch (after rethrowing KettleStepException untouched). The message includes the original exception's localized text, so it is a generic failure wrapper for the step's row loop.
Solutions
- Read e.getLocalizedMessage() embedded in msg for the root cause
- Verify Elasticsearch host/port/cluster settings and that the cluster is reachable
- Check the index mapping against the fields being sent
- Enable step logging / run with a sample of rows to find the offending row
Defensive patterns
Strategy: validation
Validate before calling
// preview the stream and confirm JSON field content is valid before the step
Object raw = row[jsonFieldIdx];
if (raw == null) throw new KettleStepException("JSON field is null in input row");
new JSONObject(raw.toString()); // throws if not valid JSON Try / catch
try { processRow flows via step error handling } catch (KettleStepException e) { logError("ES bulk row error: " + e.getLocalizedMessage(), e); } Prevention
- Verify ES cluster connectivity and index mappings before production runs
- Validate the JSON field contents upstream (e.g. JSON Input / User Defined Java)
- Use step error handling rows to capture rejected rows for diagnosis
- Keep elasticsearch-bulk-insert plugin version aligned with your ES version
When it happens
Trigger: Any non-KettleStepException thrown in processRow: transport/client failures, mapping errors, null or malformed row data, document parsing errors during bulk indexing.
Common situations: Elasticsearch cluster unreachable or returning errors; field mapping conflicts; rows whose JSON field content is invalid; wrong index/document type configuration.
Understand the failure class
Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.
Related errors
- Calculator.ErrorInStepRunning
- ElasticSearchBulk.Error.InvalidIdField
- ElasticSearchBulk.Error.NoJsonField
- ElasticSearchBulkDialog.Error.NoNodesFound
- The function call createRowCopy requires a single arguments…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/eaeeda10817a5c55.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/elasticsearch-bulk-insert/core/src/main/java/org/pentaho/di/trans/steps/elasticsearchbulk/ElasticSearchBulk.java:139
if ( first ) {
first = false;
setupData();
currentRequest = client.prepareBulk();
requestsBuffer = new ArrayList<IndexRequestBuilder>( this.batchSize );
initFieldIndexes();
}
try {
data.inputRowBuffer[data.nextBufferRowIdx++] = rowData;
return indexRow( data.inputRowMeta, rowData ) || !stopOnError;
} catch ( KettleStepException e ) {
throw e;
} catch ( Exception e ) {
rejectAllRows( e.getLocalizedMessage() );
String msg = BaseMessages.getString( PKG, "ElasticSearchBulk.Log.Exception", e.getLocalizedMessage() );
logError( msg );
throw new KettleStepException( msg, e );
}
}
/**
* Initialize <code>this.data</code>
*
* @throws KettleStepException
*/
private void setupData() throws KettleStepException {
data.nextBufferRowIdx = 0;
data.inputRowMeta = getInputRowMeta().clone(); // only available after first getRow();
data.inputRowBuffer = new Object[batchSize][];
data.outputRowMeta = data.inputRowMeta.clone();
meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,
metaStore );
}
private void initFieldIndexes() throws KettleStepException {View on GitHub (pinned to f3058517a1)