pentaho/pentaho-kettle · error · KettleXMLException
GetPreviousRowFieldMeta.Exception.UnableToReadStepInfoFromXM…
Error message
GetPreviousRowFieldMeta.Exception.UnableToReadStepInfoFromXML
What it means
GetPreviousRowFieldMeta.readData() parses the step's <field> nodes from transformation XML. Any unexpected exception while reading the XML (malformed nodes, wrong structure, casting issues) is wrapped in a KettleXMLException with this localized message and the original exception as cause.
Solutions
- Inspect the cause chain for the exact XML parsing failure and fix the .ktr XML
- Re-open and re-save the step in Spoon to regenerate valid XML
- Restore the transformation file from version control/backup
- Align Pentaho/plugin versions between the file's origin and your runtime
Defensive patterns
Strategy: try-catch
Validate before calling
// Validate XML before load: ensure each step node has a <lookup> with <field> children
Node lookup = XMLHandler.getSubNode(stepnode, "lookup"); if (lookup == null || XMLHandler.getNodes(lookup, "field") == null) { throw new IllegalArgumentException("Corrupt GetPreviousRowField XML section"); } Try / catch
try { meta.loadXML(stepnode, databases, metaStore); } catch (KettleXMLException e) { log.error("Step XML unreadable; restore file or re-create step", e); } Prevention
- Do not hand-edit .ktr files; edit in Spoon
- Keep Pentaho runtime version aligned with file producers
- Commit .ktr files and verify after merges
- Back up transformations before edits
When it happens
Trigger: Loading a .ktr file whose GetPreviousRowField step XML is malformed — missing <lookup> node, corrupted <field> entries, or XML written by a different/incompatible plugin version.
Common situations: Hand-editing transformation XML and breaking the step structure; opening a transformation saved by a newer Pentaho version in an older one; truncated/corrupted .ktr files from bad checkouts or merges.
Understand the failure class
Background: "failed to unmarshal" / json.Unmarshal errors: why parsing a response into a Go struct fails and how to fix it — this error's family across 23 libraries.
Related errors
- FuzzyMatchMeta.Exception.UnableToLoadStepInfoFromXML
- GetXMLDataMeta.Exception.ErrorLoadingXML (localized message…
- InsertUpdateMeta.Exception.UnableToReadStepInfoFromXML
- JsonInputMeta.Exception.ErrorLoadingXML
- LoadFileInputMeta.Exception.ErrorLoadingXML
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/2bb447dbd17d61e0.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/get-previous-row-field/core/src/main/java/org/pentaho/di/trans/steps/getpreviousrowfield/GetPreviousRowFieldMeta.java:147
}
private void readData( Node stepnode ) throws KettleXMLException {
try {
int nrkeys;
Node lookup = XMLHandler.getSubNode( stepnode, "fields" );
nrkeys = XMLHandler.countNodes( lookup, "field" );
allocate( nrkeys );
for ( int i = 0; i < nrkeys; i++ ) {
Node fnode = XMLHandler.getSubNodeByNr( lookup, "field", i );
fieldInStream[i] = Const.NVL( XMLHandler.getTagValue( fnode, "in_stream_name" ), "" );
fieldOutStream[i] = Const.NVL( XMLHandler.getTagValue( fnode, "out_stream_name" ), "" );
}
} catch ( Exception e ) {
throw new KettleXMLException( BaseMessages.getString(
PKG, "GetPreviousRowFieldMeta.Exception.UnableToReadStepInfoFromXML" ), e );
}
}
@Override
public void setDefault() {
fieldInStream = null;
fieldOutStream = null;
schema = "";
int nrkeys = 0;
allocate( nrkeys );
}
@Override
public String getXML() {
StringBuffer retval = new StringBuffer( 500 );View on GitHub (pinned to f3058517a1)