pentaho/pentaho-kettle · error · KettleXMLException
FileExistsMeta.Exception.UnableToReadStepInfo
Error message
FileExistsMeta.Exception.UnableToReadStepInfo
What it means
FileExistsMeta.loadXML()/readData() parses the step's XML node (fields like filenamefield, resultfieldname, includefiletype) and wraps any parsing exception in a KettleXMLException with the localized 'UnableToReadStepInfo' message. It signals corrupted or unexpected step XML when loading a transformation.
Solutions
- Open the .ktr in a text editor and fix or remove the malformed FileExists step XML.
- Re-create the FileExists step in Spoon and re-save the transformation.
- Restore the ktr from backup or version control.
- Ensure the opening/closing Spoon versions are compatible with the transformation.
Example fix
<!-- before --> <step><name>FileExists</name><type>FileExists</type><filenamefield>filename <!-- unclosed tag <!-- after --> <step><name>FileExists</name><type>FileExists</type><filenamefield>filename</filenamefield></step>
Defensive patterns
Strategy: try-catch
Validate before calling
org.w3c.dom.Document doc;
try {
doc = javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new java.io.File(ktrPath));
} catch (Exception e) {
throw new IllegalStateException("Malformed ktr XML: " + ktrPath, e);
} Try / catch
try {
TransMeta tm = new TransMeta(ktrPath);
} catch (KettleXMLException e) {
if (e.getMessage().contains("FileExistsMeta.Exception.UnableToReadStepInfo")) {
// repair or re-create the FileExists step XML
} else { throw e; }
} Prevention
- Never hand-edit .ktr XML without validating afterwards in Spoon.
- Resolve version-control merge conflicts in ktr files with the Spoon editor.
- Back up transformations before Pentaho version upgrades.
- Validate XML well-formedness in CI for repository-stored ktr files.
When it happens
Trigger: Loading a .ktr whose <step type="FileExists"> XML node is malformed, truncated, hand-edited, or produced by an incompatible plugin version.
Common situations: Manually edited XML; merge conflicts in versioned ktr files; repository export/import across Pentaho versions with changed tags; character-encoding corruption.
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
- ChangeFileEncodingMeta.Exception.UnableToReadStepInfo
- DimensionLookup.Exception.IllegalStartDateSelection
- FieldSplitterMeta.Exception.UnableToLoadStepInfoFromXML
- FuzzyMatchMeta.Exception.UnableToLoadStepInfoFromXML
- GetPreviousRowFieldMeta.Exception.UnableToReadStepInfoFromXM…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/a6cbef5494e4622c.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/fileexists/FileExistsMeta.java:187
StringBuilder retval = new StringBuilder();
retval.append( " " + XMLHandler.addTagValue( "filenamefield", filenamefield ) );
retval.append( " " + XMLHandler.addTagValue( "resultfieldname", resultfieldname ) );
retval.append( " " ).append( XMLHandler.addTagValue( "includefiletype", includefiletype ) );
retval.append( " " + XMLHandler.addTagValue( "filetypefieldname", filetypefieldname ) );
retval.append( " " ).append( XMLHandler.addTagValue( "addresultfilenames", addresultfilenames ) );
return retval.toString();
}
private void readData( Node stepnode, List<DatabaseMeta> databases ) throws KettleXMLException {
try {
filenamefield = XMLHandler.getTagValue( stepnode, "filenamefield" );
resultfieldname = XMLHandler.getTagValue( stepnode, "resultfieldname" );
includefiletype = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "includefiletype" ) );
filetypefieldname = XMLHandler.getTagValue( stepnode, "filetypefieldname" );
addresultfilenames = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "addresultfilenames" ) );
} catch ( Exception e ) {
throw new KettleXMLException(
BaseMessages.getString( PKG, "FileExistsMeta.Exception.UnableToReadStepInfo" ), e );
}
}
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
try {
filenamefield = rep.getStepAttributeString( id_step, "filenamefield" );
resultfieldname = rep.getStepAttributeString( id_step, "resultfieldname" );
includefiletype = rep.getStepAttributeBoolean( id_step, "includefiletype" );
filetypefieldname = rep.getStepAttributeString( id_step, "filetypefieldname" );
addresultfilenames = rep.getStepAttributeBoolean( id_step, "addresultfilenames" );
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString(
PKG, "FileExistsMeta.Exception.UnexpectedErrorReadingStepInfo" ), e );
}
}
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {View on GitHub (pinned to f3058517a1)