pentaho/pentaho-kettle · error · KettleXMLException
MergeRowsMeta.Exception.UnableToLoadStepInfo
MergeRowsMeta.Exception.UnableToLoadStepInfo
Error message
MergeRowsMeta.Exception.UnableToLoadStepInfo
What it means
Thrown by MergeRowsMeta.readData (called from loadXML) when parsing the Merge Rows step's XML node fails. It reads the 'reference' and 'compare' stream subjects from the stepnode and wraps any Exception in a KettleXMLException.
Solutions
- Inspect KettleXMLException.getCause() for the precise parsing failure.
- Open the .ktr in Spoon and re-save the Merge Rows step to regenerate clean XML.
- Verify the step node contains well-formed <reference> and <compare> elements.
- Restore the file from version control or backup if corrupted.
Example fix
// before (missing closing tag) <reference>Ref step // after <reference>Ref step</reference>
Defensive patterns
Strategy: try-catch
Validate before calling
// Validate the transformation XML is well-formed before loading
Document doc = XMLHandler.loadXMLFile(ktrFile);
if (doc == null) throw new IllegalArgumentException("Unreadable transformation XML"); Try / catch
try {
TransMeta tm = new TransMeta(ktrFile);
} catch (KettleXMLException e) {
log.error("Merge rows step XML load failed: " + e.getCause(), e);
} Prevention
- Edit .ktr files only through Spoon; avoid manual XML edits.
- Fix merge conflicts by re-generating the file in Spoon, not by hand.
- Use matching Kettle versions for authoring and execution.
- Checksum/verify files after transfer to catch truncation.
When it happens
Trigger: loadXML on a .ktr whose <merge_rows> node is malformed or triggers an exception while reading tags or resolving info streams — corrupted XML, hand-edited files, or incompatible-version step XML.
Common situations: Hand-edited or merge-conflicted .ktr breaking <reference>/<compare> tags; opening a transformation saved by a newer Kettle version; truncated file transfer.
Understand the failure class
Background: JSON parse error: "Unexpected token" / "not valid JSON" / "failed to parse" — what JSON parsers are really complaining about — this error's family across 45 libraries.
Related errors
- MergeJoinMeta.Exception.UnableToLoadStepInfo
- MergeRowsMeta.Exception.UnexpectedErrorReadingStepInfo
- Unable to load step info from XML
- Unable to load step info from XML
- AccessInputMeta.Exception.ErrorReadingRepository
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/2f1d31dcab807ded.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/mergerows/MergeRowsMeta.java:198
Node keynode = XMLHandler.getSubNodeByNr( keysnode, "key", i );
keyFields[i] = XMLHandler.getNodeValue( keynode );
}
for ( int i = 0; i < nrValues; i++ ) {
Node valuenode = XMLHandler.getSubNodeByNr( valuesnode, "value", i );
valueFields[i] = XMLHandler.getNodeValue( valuenode );
}
flagField = XMLHandler.getTagValue( stepnode, "flag_field" );
List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();
StreamInterface referenceStream = infoStreams.get( 0 );
StreamInterface compareStream = infoStreams.get( 1 );
compareStream.setSubject( XMLHandler.getTagValue( stepnode, "compare" ) );
referenceStream.setSubject( XMLHandler.getTagValue( stepnode, "reference" ) );
} catch ( Exception e ) {
throw new KettleXMLException(
BaseMessages.getString( PKG, "MergeRowsMeta.Exception.UnableToLoadStepInfo" ), e );
}
}
@Override
public void setDefault() {
flagField = "flagfield";
allocate( 0, 0 );
}
@Override
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
try {
int nrKeys = rep.countNrStepAttributes( id_step, "key_field" );
int nrValues = rep.countNrStepAttributes( id_step, "value_field" );
allocate( nrKeys, nrValues );
View on GitHub (pinned to f3058517a1)