pentaho/pentaho-kettle · error · KettleStepException
e
Error message
e
What it means
At the end of getFields(), any KettleException not already handled (e.g. from row.addValueMeta / clone operations) is wrapped in a new KettleStepException whose message is just the cause's toString ('e'). It signals the step failed while computing its output row metadata.
Solutions
- Read the wrapped cause message to find the failing field/conversion.
- Fix the value type / length / precision settings for the script's output fields.
- Remove or repair the offending field entry in the step config.
- Validate the transformation in Spoon to catch metadata issues earlier.
Defensive patterns
Strategy: try-catch
Try / catch
try { step.getFields(...); } catch (KettleStepException e) {
Throwable cause = e.getCause(); // inspect cause for the real KettleException
logError('getFields failed: ' + cause, e);
} Prevention
- Verify output field value types/lengths in the step config.
- Preview the step to surface metadata conversion issues early.
- Regenerate step metadata if loaded from old XML versions.
When it happens
Trigger: getFields() throws a generic KettleException during value-type conversion or adding value metadata for one of the script's output/replace fields.
Common situations: Invalid type conversions configured in the step (e.g. converting a field to an incompatible type), null value metadata, or corrupted step metadata loaded from XML.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- e (no own message; error building CSV input fields)
- ScriptValuesMetaMod.Exception.FieldToReplaceNotFound
- AbsSecurityManager.ERROR_0004_UNABLE_TO_APPLY_LOGICAL_ROLES_TO_RUNTIME_ROLE
- AnalyticQueryMeta.Exception.SubjectFieldNotFound
- BaseStep.SafeMode.Exception.DoubleFieldnames
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/0f3555adab2f32ba.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/scriptvalues_mod/ScriptValuesMetaMod.java:442
v = ValueMetaFactory.cloneValueMeta( source, type[i] );
row.setValueMeta( valueIndex, v );
} else {
if ( !Utils.isEmpty( rename[i] ) ) {
v = ValueMetaFactory.createValueMeta( rename[i], type[i] );
} else {
v = ValueMetaFactory.createValueMeta( fieldname[i], type[i] );
}
}
v.setLength( length[i] );
v.setPrecision( precision[i] );
v.setOrigin( originStepname );
if ( !replace[i] ) {
row.addValueMeta( v );
}
}
}
} catch ( KettleException e ) {
throw new KettleStepException( e );
}
}
public String getXML() {
StringBuilder retval = new StringBuilder( 300 );
retval.append( " " ).append( XMLHandler.addTagValue( "compatible", compatible ) );
retval.append( " " ).append( XMLHandler.addTagValue( "optimizationLevel", optimizationLevel ) );
retval.append( " <jsScripts>" );
for ( int i = 0; i < jsScripts.length; i++ ) {
retval.append( " <jsScript>" );
retval
.append( " " ).append( XMLHandler.addTagValue( JSSCRIPT_TAG_TYPE, jsScripts[i].getScriptType() ) );
retval
.append( " " ).append( XMLHandler.addTagValue( JSSCRIPT_TAG_NAME, jsScripts[i].getScriptName() ) );
retval.append( " " ).append( XMLHandler.addTagValue( JSSCRIPT_TAG_SCRIPT, jsScripts[i].getScript() ) );
retval.append( " </jsScript>" );View on GitHub (pinned to f3058517a1)