pentaho/pentaho-kettle · error · KettleXMLException
JobEntryCopyMoveResultFilenames.CanNotLoadFromXML
Error message
JobEntryCopyMoveResultFilenames.CanNotLoadFromXML
What it means
JobEntryCopyMoveResultFilenames.loadXML throws this KettleXMLException when the XML node for the 'copy/move result filenames' job entry cannot be parsed. It wraps the original exception and includes xe.getMessage(), signaling that settings like destination folder, wildcard, overwrite flags could not be read from XML.
Solutions
- Open the .kjb in a text/XML editor and validate well-formedness of the entry node.
- Recreate the job entry in Spoon and re-save the job.
- Check xe.getMessage() in the thrown exception for the precise parse failure.
- Ensure file encoding is UTF-8 when transferring job files between systems.
Defensive patterns
Strategy: try-catch
Validate before calling
// verify node is parseable before loadXML
if (entrynode == null || entrynode.getNodeType() != Node.ELEMENT_NODE) {
throw new IllegalArgumentException("entrynode must be an element node");
} Try / catch
try {
jobEntry.loadXML(entrynode, databases, slaveServers);
} catch (KettleXMLException e) {
logError("Cannot parse copy/move result filenames entry: " + e.getMessage(), e);
// recreate entry with defaults or abort the job load
} Prevention
- Transfer .kjb files in binary/UTF-8-safe modes
- Avoid third-party tools generating the entry XML unless schema-conformant
- Validate job XML against the Pentaho schema before loading
- Keep Pentaho versions aligned across environments
When it happens
Trigger: Calling loadXML on a job entry node with malformed or unexpected content: missing attributes, invalid characters, or an XMLHandler parsing failure while reading tags like 'destination_folder', 'OverwriteFile', 'CreateDestinationFolder'.
Common situations: Corrupted .kjb files after manual edits; files transferred with wrong encoding; XML generated by third-party tools not matching the expected schema.
Related errors
- JobCopyFiles.Error.Exception.UnableLoadXML
- JobEntryMSAccessBulkLoad.Meta.UnableLoadXML
- Unable to load job entry of type 'create file' from XML node
- Unable to load job entry of type 'create folder' from XML…
- CubeInputMeta.Exception.UnableToLoadStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/a6dc3570edb349fa.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/job/entries/copymoveresultfilenames/JobEntryCopyMoveResultFilenames.java:185
success_condition = XMLHandler.getTagValue( entrynode, "success_condition" );
add_date = "Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "add_date" ) );
add_time = "Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "add_time" ) );
SpecifyFormat = "Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "SpecifyFormat" ) );
AddDateBeforeExtension =
"Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "AddDateBeforeExtension" ) );
date_time_format = XMLHandler.getTagValue( entrynode, "date_time_format" );
action = XMLHandler.getTagValue( entrynode, "action" );
OverwriteFile = "Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "OverwriteFile" ) );
CreateDestinationFolder =
"Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "CreateDestinationFolder" ) );
RemovedSourceFilename = "Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "RemovedSourceFilename" ) );
AddDestinationFilename =
"Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "AddDestinationFilename" ) );
} catch ( KettleXMLException xe ) {
throw new KettleXMLException( BaseMessages.getString(
PKG, "JobEntryCopyMoveResultFilenames.CanNotLoadFromXML", xe.getMessage() ) );
}
}
public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
List<SlaveServer> slaveServers ) throws KettleException {
try {
foldername = rep.getJobEntryAttributeString( id_jobentry, "foldername" );
specifywildcard = rep.getJobEntryAttributeBoolean( id_jobentry, "specify_wildcard" );
wildcard = rep.getJobEntryAttributeString( id_jobentry, "wildcard" );
wildcardexclude = rep.getJobEntryAttributeString( id_jobentry, "wildcardexclude" );
destination_folder = rep.getJobEntryAttributeString( id_jobentry, "destination_folder" );
nr_errors_less_than = rep.getJobEntryAttributeString( id_jobentry, "nr_errors_less_than" );
success_condition = rep.getJobEntryAttributeString( id_jobentry, "success_condition" );
add_date = rep.getJobEntryAttributeBoolean( id_jobentry, "add_date" );
add_time = rep.getJobEntryAttributeBoolean( id_jobentry, "add_time" );
SpecifyFormat = rep.getJobEntryAttributeBoolean( id_jobentry, "SpecifyFormat" );
date_time_format = rep.getJobEntryAttributeString( id_jobentry, "date_time_format" );View on GitHub (pinned to f3058517a1)