pentaho/pentaho-kettle · error · KettleStepException
e (wrapped exception)
Error message
e (wrapped exception)
What it means
In getFields (StepMetaInterface), while converting each configured XML field into a ValueMeta (applying format, decimal/grouping/currency symbols), any exception is wrapped in a KettleStepException with the original exception as the sole cause. It signals a bad field definition (usually an invalid format mask).
Solutions
- Inspect the chained cause to identify the offending field; check its Format mask in the Fields tab.
- Fix or clear the Format value (e.g. use a valid SimpleDateFormat/DecimalFormat pattern for the runtime locale).
- Test the step in isolation and preview data to confirm the corrected mask parses sample values.
- If the field is a string anyway, set its type to String and drop the conversion mask.
Example fix
// before field.setFormat( "YYYY-MM-DD" ); // DecimalFormat-style caps, wrong for java.text.SimpleDateFormat // after field.setFormat( "yyyy-MM-dd" );
Defensive patterns
Strategy: validation
Validate before calling
// Validate a date format mask before configuring the field new SimpleDateFormat( "yyyy-MM-dd" ); // throws IllegalArgumentException on invalid mask
Try / catch
try { stepMeta.getFields( rowMeta, origin, null, null, space, null ); } catch ( KettleStepException e ) { log.error( "Bad field definition: " + e.getCause(), e ); } Prevention
- Test Format masks on sample values in Spoon's preview before saving.
- Use java.text.SimpleDateFormat/DecimalFormat-compatible patterns.
- Prefer String type with no mask when no conversion is actually needed.
When it happens
Trigger: GetXMLDataMeta.getFields loop: new ValueMeta(...)/setConversionMask/setDecimalSymbol or r.addValueMeta throws while building the output row layout for a field whose Format/Length/Precision is invalid.
Common situations: Invalid or locale-inconsistent number/date format masks entered in the Fields tab, copy-pasted masks from other locales, empty format strings on typed fields.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- e.toString()
- FuzzyMatchMeta.Exception.UnexpecteErrorReadingStepInfoFromRe…
- FuzzyMatchMeta.Exception.ReturnValueCanNotBeFound
- FuzzyMatchMeta.Exception.UnableToLoadStepInfoFromXML
- GetXMLData.Error.UnableReadFile (localized message)
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/23b209933892b4d0.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/getxmldata/GetXMLDataMeta.java:946
for ( i = 0; i < inputFields.length; i++ ) {
GetXMLDataField field = inputFields[i];
int type = field.getType();
if ( type == ValueMeta.TYPE_NONE ) {
type = ValueMeta.TYPE_STRING;
}
try {
ValueMetaInterface v = ValueMetaFactory.createValueMeta( space.environmentSubstitute( field.getName() ), type );
v.setLength( field.getLength() );
v.setPrecision( field.getPrecision() );
v.setOrigin( name );
v.setConversionMask( field.getFormat() );
v.setDecimalSymbol( field.getDecimalSymbol() );
v.setGroupingSymbol( field.getGroupSymbol() );
v.setCurrencySymbol( field.getCurrencySymbol() );
r.addValueMeta( v );
} catch ( Exception e ) {
throw new KettleStepException( e );
}
}
if ( includeFilename ) {
ValueMetaInterface v = new ValueMeta( space.environmentSubstitute( filenameField ), ValueMeta.TYPE_STRING );
v.setLength( 250 );
v.setPrecision( -1 );
v.setOrigin( name );
r.addValueMeta( v );
}
if ( includeRowNumber ) {
ValueMetaInterface v = new ValueMeta( space.environmentSubstitute( rowNumberField ), ValueMeta.TYPE_INTEGER );
v.setLength( ValueMetaInterface.DEFAULT_INTEGER_LENGTH, 0 );
v.setOrigin( name );
r.addValueMeta( v );
}
// Add additional fieldsView on GitHub (pinned to f3058517a1)