pentaho/pentaho-kettle · error · KettleXMLException
ColumnExistsMeta.Exception.UnableToReadStepInfo
Error message
ColumnExistsMeta.Exception.UnableToReadStepInfo
What it means
loadXML wraps any exception raised while parsing the step's XML node into a KettleXMLException with message 'Unable to read step info from XML node'. It indicates corrupt or malformed XML for the ColumnExists step definition.
Solutions
- Open the ktr file and repair/validate the <step> XML block for this step
- Re-export or re-save the transformation from Spoon on a working version
- Check the cause chain (e.getCause()) to find the exact parsing failure
Example fix
// before (malformed hand-edit) <istablenameInfield>yes</istablenameInfield> // after <istablenameInfield>Y</istablenameInfield>
Defensive patterns
Strategy: try-catch
Validate before calling
Document doc = XMLHandler.loadXMLFile(ktrFile);
if (XMLHandler.getSubNode(XMLHandler.getFirstSubNode(doc, "transformation"), "step") == null) {
throw new IllegalArgumentException("Transformation has no step nodes");
} Try / catch
try {
transMeta = new TransMeta(ktrFile);
} catch (KettleXMLException e) {
log.error("Cannot read ColumnExists step XML: " + e.getCause(), e);
throw e;
} Prevention
- Never hand-edit ktr XML; edit in Spoon
- Validate XML against the PDI schema in CI
- Keep PDI versions consistent between designers and runners
When it happens
Trigger: readData throws (XMLHandler.getTagValue fails, ClassCastException, etc.) while loading a .ktr/.kjb containing a ColumnExists step via loadXML.
Common situations: Hand-edited or truncated ktr XML; wrong tag casing/format from an old export; XML produced by an incompatible PDI version.
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
- CreditCardValidatorMeta.Exception.UnableToReadStepInfo
- ScriptMeta.Exception.UnableToLoadStepInfoFromXML
- SETVARIABLE0004
- StreamLookupMeta.Exception.UnableToLoadStepInfoFromXML
- SymmetricCryptoTransMeta.Exception.UnableToLoadStepInfoFromXML
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/a11e2c5a16c51374.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/columnexists/ColumnExistsMeta.java:230
retval.append( " " + XMLHandler.addTagValue( "istablenameInfield", istablenameInfield ) );
retval.append( " " + XMLHandler.addTagValue( "tablenamefield", tablenamefield ) );
retval.append( " " + XMLHandler.addTagValue( "columnnamefield", columnnamefield ) );
retval.append( " " + XMLHandler.addTagValue( "resultfieldname", resultfieldname ) );
return retval.toString();
}
private void readData( Node stepnode, List<DatabaseMeta> databases ) throws KettleXMLException {
try {
String con = XMLHandler.getTagValue( stepnode, "connection" );
database = DatabaseMeta.findDatabase( databases, con );
tablename = XMLHandler.getTagValue( stepnode, "tablename" );
schemaname = XMLHandler.getTagValue( stepnode, "schemaname" );
istablenameInfield = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "istablenameInfield" ) );
tablenamefield = XMLHandler.getTagValue( stepnode, "tablenamefield" );
columnnamefield = XMLHandler.getTagValue( stepnode, "columnnamefield" );
resultfieldname = XMLHandler.getTagValue( stepnode, "resultfieldname" ); // Optional, can be null
} catch ( Exception e ) {
throw new KettleXMLException( BaseMessages.getString( PKG, "ColumnExistsMeta.Exception.UnableToReadStepInfo" ),
e );
}
}
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )
throws KettleException {
try {
database = rep.loadDatabaseMetaFromStepAttribute( id_step, "id_connection", databases );
tablename = rep.getStepAttributeString( id_step, "tablename" );
schemaname = rep.getStepAttributeString( id_step, "schemaname" );
istablenameInfield = rep.getStepAttributeBoolean( id_step, "istablenameInfield" );
tablenamefield = rep.getStepAttributeString( id_step, "tablenamefield" );
columnnamefield = rep.getStepAttributeString( id_step, "columnnamefield" );
resultfieldname = rep.getStepAttributeString( id_step, "resultfieldname" );
} catch ( Exception e ) {
throw new KettleException(
BaseMessages.getString( PKG, "ColumnExistsMeta.Exception.UnexpectedErrorReadingStepInfo" ), e );
}View on GitHub (pinned to f3058517a1)