pentaho/pentaho-kettle · error · KettleException
message
Error message
message
What it means
convertLineToRow() throws a KettleException carrying the runtime variable 'message' when a per-field conversion (via a conversion meta / value normalization, e.g. DataConverter) fails on a row AND error handling for that conversion is not set to skip the line. The message describes the field-level conversion failure; the original exception is attached.
Solutions
- Read 'message' in the exception — it names the field and conversion that failed; fix that field's type/format in the Fields tab.
- Enable error handling on the step and choose to skip error lines so bad rows are routed instead of aborting the transformation.
- Correct the source data or add a 'Format' mask matching the actual values (dates, numbers, currency).
- Set appropriate null/empty handling (treat empty string as null) for numeric fields.
Example fix
// before: field 'amount' declared Number, data uses comma decimal separator '12,50' // after: set the field's Format to match, e.g. grouping ',' decimal '.' // or enable error handling: step.setLineHandlingError -> skip error lines // and declare Format '###,##0.00' appropriately for the locale
Defensive patterns
Strategy: validation
Validate before calling
// Validate field values against declared types/formats before the step converts them
try { new java.text.SimpleDateFormat("yyyy-MM-dd").parse(dateValue); } catch (ParseException ex) { reject(dateValue); }
try { new java.text.DecimalFormat("#,##0.00").parse(amountValue); } catch (ParseException ex) { reject(amountValue); } Try / catch
try {
row = convertLineToRow(line);
} catch (KettleException e) {
if (message == null || !skipOnError) throw e; // abort with field details in message
errorRowHandler.handle(line, e);
} Prevention
- Match field types and Format masks to the actual data (dates, decimals, locale)
- Enable error handling / 'skip error lines' for dirty real-world data
- Treat empty strings as null for numeric fields
- Audit a sample of the file with step Preview before running in production
When it happens
Trigger: A field value in the file cannot be converted to the declared field type/format (e.g. 'abc' into a Number field, bad date format) while isErrorLineSkipped() is false, so the step aborts instead of routing the row to error handling.
Common situations: Wrong field type or format mask defined in the Fields tab, decimal separators differing from the locale, empty values mapped to non-nullable numeric/date fields.
Understand the failure class
Background: Type mismatch errors: IllegalArgumentException, TypeError and type guards across 150 open-source libraries — this error's family across 150 libraries.
Related errors
- TextFileInput.Log.Error.ErrorConvertingLineText
- : can't be converted to a timestamp
- : can't be converted to an Internet Address
- Can't convert a string to a date
- Cannot convert value to Base.Array.
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/26c5fa22603ae810.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/textfileinput/TextFileInput.java:734
errorFields = sb.toString();
}
if ( errorText != null ) {
StringBuilder sb = new StringBuilder( errorText );
if ( sb.length() > 0 ) {
sb.append( Const.CR );
}
sb.append( message );
errorText = sb.toString();
}
if ( errorHandler != null ) {
errorHandler.handleLineError( textFileLine.getLineNumber(), AbstractFileErrorHandler.NO_PARTS );
}
if ( info.isErrorLineSkipped() ) {
r = null; // compensates for stmt: r.setIgnore();
}
} else {
throw new KettleException( message, e );
}
} else {
value = pol;
}
}
} else {
// No data found: TRAILING NULLCOLS: add null value...
value = null;
}
// Now add value to the row (if we're not skipping the row)
if ( r != null ) {
r[valuenr] = value;
}
}
// none of this applies if we're skipping the row
if ( r != null ) {View on GitHub (pinned to f3058517a1)