pentaho/pentaho-kettle · error · KettleXMLException
Unable to load step info from XML
Error message
Unable to load step info from XML
What it means
KettleXMLException with the literal message 'Unable to load step info from XML' thrown by FieldsChangeSequenceMeta.readData() (called via loadXML) when parsing the step's <fields> node fails — e.g. reading the nrfields count or per-field <field>/<name> tags. It wraps the original exception so the transformation cannot load.
Solutions
- Validate the .ktr XML and ensure the FieldsChangeSequence step node contains a <fields> element with <field><name> entries.
- Inspect getCause() of the KettleXMLException for the exact parse/NPE cause.
- Recreate the step in Spoon and re-save the transformation.
- Restore the transformation file from backup or version control.
Example fix
// before: fields block missing <fields/> // after: valid fields block <fields> <field><name>status</name></field> <field><name>region</name></field> </fields>
Defensive patterns
Strategy: try-catch
Validate before calling
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(ktrPath)); // pre-validate XML
Try / catch
try { transMeta = new TransMeta(ktrPath); } catch (KettleXMLException e) { log.error("step XML invalid: " + e.getCause(), e); } Prevention
- Avoid manual XML edits on .ktr files
- Keep <fields> block intact when copying steps
- Recreate corrupted steps in Spoon and re-save
When it happens
Trigger: An Exception occurs in readData() while calling XMLHandler.getNodes/getSubNodeByNr/getTagValue on the stepnode — malformed XML, missing <fields> element, or null fnode causing NPE when reading 'name'.
Common situations: Hand-edited .ktr where the fields block was deleted; truncated/corrupt file from a failed save; step XML copied between transformations missing the fields section; version drift in the XML layout.
Related errors
- ExecSQLRowMeta.Exception.UnableToLoadStepInfoFromXML
- AppendMeta.Exception.UnableToLoadStepInfo
- CombinationLookupMeta.Exception.UnableToLoadStepInfo
- ERROR_0001_Cannot_Load_Job_Entry_From_Xml_Node
- ExecProcessMeta.Exception.UnableToReadStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/729c03eed25fa618.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/fieldschangesequence/FieldsChangeSequenceMeta.java:149
}
private void readData( Node stepnode ) throws KettleXMLException {
try {
start = XMLHandler.getTagValue( stepnode, "start" );
increment = XMLHandler.getTagValue( stepnode, "increment" );
resultfieldName = XMLHandler.getTagValue( stepnode, "resultfieldName" );
Node fields = XMLHandler.getSubNode( stepnode, "fields" );
int nrfields = XMLHandler.countNodes( fields, "field" );
allocate( nrfields );
for ( int i = 0; i < nrfields; i++ ) {
Node fnode = XMLHandler.getSubNodeByNr( fields, "field", i );
fieldName[i] = XMLHandler.getTagValue( fnode, "name" );
}
} catch ( Exception e ) {
throw new KettleXMLException( "Unable to load step info from XML", e );
}
}
@Override
public String getXML() {
StringBuilder retval = new StringBuilder();
retval.append( " " + XMLHandler.addTagValue( "start", start ) );
retval.append( " " + XMLHandler.addTagValue( "increment", increment ) );
retval.append( " " + XMLHandler.addTagValue( "resultfieldName", resultfieldName ) );
retval.append( " <fields>" + Const.CR );
for ( int i = 0; i < fieldName.length; i++ ) {
retval.append( " <field>" + Const.CR );
retval.append( " " + XMLHandler.addTagValue( "name", fieldName[i] ) );
retval.append( " </field>" + Const.CR );
}
retval.append( " </fields>" + Const.CR );
View on GitHub (pinned to f3058517a1)