pentaho/pentaho-kettle · error · KettleException
exc (wraps parse exception, no own message)
Error message
exc (wraps parse exception, no own message)
What it means
In CsvInputAwareHelper.getStringFromRow, when failOnParseError is true and a parsing exception (exc) was recorded earlier in the read, it is re-thrown as-is if already a KettleException, otherwise wrapped in new KettleException(exc). The visible message is just the wrapped exception's toString, since no own message is supplied.
Solutions
- Inspect the wrapped cause for the underlying parse error and offending field
- Correct the field's declared format/type in the step metadata to match the file
- Fix the source file encoding or the bad record
- If bad rows are expected, disable 'fail on parse error' and configure error handling to route them to an error stream
Defensive patterns
Strategy: try-catch
Validate before calling
// sample the file and verify typed fields parse before running the full transformation String s = row.get(0); Integer.parseInt(s.trim()); // throws early on malformed data
Try / catch
try { helper.getStringFromRow(row, index, failOnParseError); }
catch (KettleException e) { logError("CSV parse failed: " + e.getCause(), e); routeToErrorStream(row, e); } Prevention
- Enable error handling instead of fail-on-parse-error for dirty data
- Confirm file encoding matches the step setting
- Preview rows in Spoon before full runs
When it happens
Trigger: Reading a CSV row whose field fails to parse into the declared type (e.g. text field with invalid encoding or malformed number/date) while the text-file-input/CSV step has 'fail on parse error' enabled.
Common situations: Data file contains empty or malformed values in typed columns, wrong file encoding causing garbled bytes, schema changed upstream (column order/types).
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- CsvInput.Exception.ErrorPreparingParallelRun
- e.getMessage() (first conversion cause, no own message)
- Error loading transformation step from XML
- Error loading transformation step from XML
- java.lang.NullPointerException (wrapped; row too short for…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/5d4d981fc4f67519.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/common/CsvInputAwareHelper.java:192
* @return the row value at the given index
*/
default String getStringFromRow( final RowMetaInterface rowMeta, final Object[] row, final int index,
final boolean failOnParseError ) throws KettleException {
String string = null;
Exception exc = null;
try {
string = rowMeta.getString( row, index );
} catch ( final Exception e ) {
exc = e;
}
// if 'failOnParseError' is true, and we caught an exception, we either re-throw the exception, or wrap its as a
// KettleException, if it isn't one already
if ( failOnParseError ) {
if ( exc instanceof KettleException ) {
throw (KettleException) exc;
} else if ( exc != null ) {
throw new KettleException( exc );
}
}
// if 'failOnParseError' is false, or there is no exception otherwise, we get the string value straight from the row
// object
if ( string == null ) {
if ( ( row.length <= index ) && failOnParseError ) {
throw new KettleException( new NullPointerException() );
}
string = row.length <= index || row[ index ] == null ? null : row[ index ].toString();
}
return string;
}
/**
* Creates a buffered input stream reader for the given CSV input metadata and input stream.
*View on GitHub (pinned to f3058517a1)