pentaho/pentaho-kettle · error · KettleXMLException
LoadFileInputMeta.Exception.ErrorLoadingXML
LoadFileInputMeta.Exception.ErrorLoadingXML
Error message
LoadFileInputMeta.Exception.ErrorLoadingXML
What it means
Thrown from LoadFileInputMeta when loading the step's configuration from a saved .ktr XML document (loadXML). Any Exception while reading XMLHandler tag values (malformed step XML, unexpected node structure, XMLHandler failure) is wrapped in KettleXMLException with message key LoadFileInputMeta.Exception.ErrorLoadingXML. It signals the step definition in the XML could not be deserialized.
Solutions
- Inspect the cause in the stack trace to find the malformed tag, then repair or remove the LoadFileInput step XML node.
- Recreate the step in Spoon and re-save the .ktr.
- Open the file with the PDI version it was created with, or upgrade Spoon to match the file's version.
- Keep .ktr files in version control and transfer in binary mode to avoid truncation/corruption.
Example fix
// before (hand-edited .ktr) <files><name>in.txt</name></files> <!-- required tags like file/field structure removed --> // after // restore the original step XML from version control or recreate the LoadFileInput step in Spoon
Defensive patterns
Strategy: try-catch
Validate before calling
// Before loading, sanity-check the XML parses and contains the step node:
Document doc = XMLHandler.loadXMLFile(new File(ktrPath));
if (doc == null || XMLHandler.getSubNode(XMLHandler.getSubNode(doc, "transformation"), "step") == null) {
throw new IllegalStateException("Corrupt or missing step XML in " + ktrPath);
} Try / catch
try {
transMeta = new TransMeta(ktrPath);
} catch (KettleXMLException e) {
if (e.getMessage().contains("ErrorLoadingXML")) {
log.error("Failed to parse LoadFileInput step XML: " + e.getCause(), e);
// recover from a backup copy / recreate the step
} else { throw e; }
} Prevention
- Keep .ktr files in version control to restore known-good XML.
- Do not hand-edit transformation XML; edit via Spoon.
- Transfer .ktr files in binary mode; avoid email truncation.
- Use the same or newer PDI version than the one that produced the file.
When it happens
Trigger: TransformationRepoXML / TransMeta.loadXML parses a <step type="LoadFileInput"> node and loadXML throws: corrupted .ktr file, manually edited XML, XML from a newer/older Pentaho version with a changed schema, or truncation during transfer.
Common situations: Opening a .ktr generated by a different PDI version; hand-editing the XML and breaking tag structure; file copied via email/FTP in text mode and truncated; merging transformations by copy-paste with malformed step nodes.
Related errors
- InsertUpdateMeta.Exception.UnableToReadStepInfoFromXML
- Unable to load step info from XML
- Unable to load step info from XML
- Unable to load step info from XML
- Unable to load step info from XML
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/0053ac8779a8e4bd.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/loadfileinput/LoadFileInputMeta.java:717
inputFields[i] = field;
}
// Is there a limit on the number of rows we process?
rowLimit = Const.toLong( XMLHandler.getTagValue( stepnode, LIMIT ), 0L );
fileInField = YES.equalsIgnoreCase( XMLHandler.getTagValue( stepnode, IS_IN_FIELDS ) );
dynamicFilenameField = XMLHandler.getTagValue( stepnode, DYNAMIC_FILENAME_FIELD );
shortFileFieldName = XMLHandler.getTagValue( stepnode, SHORT_FILE_FIELD_NAME );
pathFieldName = XMLHandler.getTagValue( stepnode, PATH_FIELD_NAME );
hiddenFieldName = XMLHandler.getTagValue( stepnode, HIDDEN_FIELD_NAME );
lastModificationTimeFieldName = XMLHandler.getTagValue( stepnode, LAST_MODIFICATION_TIME_FIELD_NAME );
uriNameFieldName = XMLHandler.getTagValue( stepnode, URI_NAME_FIELD_NAME );
rootUriNameFieldName = XMLHandler.getTagValue( stepnode, ROOT_URI_NAME_FIELD_NAME );
extensionFieldName = XMLHandler.getTagValue( stepnode, EXTENSION_FIELD_NAME );
} catch ( Exception e ) {
throw new KettleXMLException( BaseMessages.getString( PKG, "LoadFileInputMeta.Exception.ErrorLoadingXML", e
.toString() ) );
}
}
public void allocate( int nrFiles, int nrFields ) {
fileName = new String[ nrFiles ];
fileMask = new String[ nrFiles ];
excludeFileMask = new String[ nrFiles ];
fileRequired = new String[ nrFiles ];
includeSubFolders = new String[ nrFiles ];
inputFields = new LoadFileInputField[ nrFields ];
}
public void setDefault() {
shortFileFieldName = null;
pathFieldName = null;
hiddenFieldName = null;
lastModificationTimeFieldName = null;View on GitHub (pinned to f3058517a1)