pentaho/pentaho-kettle · error · KettleXMLException
JobEntryEval.UnableToLoadFromXml
Error message
JobEntryEval.UnableToLoadFromXml
What it means
JobEntryEval.loadXML() reads the <script> tag from a job entry's XML node; any Exception during XML parsing (including from super.loadXML) is rethrown as a KettleXMLException with the localized message 'JobEntryEval.UnableToLoadFromXml'. It means the Eval (JavaScript) job entry could not be deserialized from a .kjb job file.
Solutions
- Inspect the chained cause to find the exact XML parse failure and tag involved.
- Open the .kjb in Spoon; if it fails, repair or recreate the Eval job entry node so the <script> element is well-formed.
- Check the file was not truncated or corrupted in transit and re-export the job.
- Confirm the Pentaho/Kettle version that produced the XML matches the runtime version.
Defensive patterns
Strategy: try-catch
Validate before calling
// Validate job XML before loading
Document doc = XMLHandler.loadXMLFile(jobFile);
if (XMLHandler.getSubNode(doc, "job") == null) {
throw new IllegalArgumentException("Not a valid Kettle job XML");
} Try / catch
try {
JobMeta meta = new JobMeta(jobFile, rep, metaStore);
} catch (KettleXMLException e) {
logError("Failed to load Eval entry from XML: " + e.getMessage(), e);
// fall back to re-exported job or backup copy
} Prevention
- Never hand-edit .kjb files; edit jobs through Spoon.
- Keep producing and consuming Pentaho versions aligned.
- Keep backups of job files before edits or upgrades.
- Verify file transfers preserve the XML intact (checksums).
When it happens
Trigger: Loading a job (JobMeta constructed from an XML file or stream) that contains a JobEntryEval node whose XML is malformed, whose 'script' tag cannot be read, or whose parent JobEntryBase.loadXML fails.
Common situations: Corrupted or hand-edited .kjb file; XML produced by a newer Pentaho version with an incompatible layout; truncation of the file during transfer; missing tags after a merge conflict.
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
- JobEntryAbort.UnableToLoadFromXml.Label
- JobEntryAddResultFilenames.UnableToLoadFromXml
- JobEntryCheckFilesLocked.UnableToLoadFromXml
- JobEntryColumnsExist.Meta.UnableLoadXml
- JobEntryConnectedToRepository.Meta.UnableToLoadFromXML
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/39a9827ad64d753d.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/job/entries/eval/JobEntryEval.java:85
return je;
}
public String getXML() {
StringBuilder retval = new StringBuilder( 50 );
retval.append( super.getXML() );
retval.append( " " ).append( XMLHandler.addTagValue( "script", script ) );
return retval.toString();
}
public void loadXML( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers,
Repository rep, IMetaStore metaStore ) throws KettleXMLException {
try {
super.loadXML( entrynode, databases, slaveServers );
script = XMLHandler.getTagValue( entrynode, "script" );
} catch ( Exception e ) {
throw new KettleXMLException( BaseMessages.getString( PKG, "JobEntryEval.UnableToLoadFromXml" ), e );
}
}
public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
List<SlaveServer> slaveServers ) throws KettleException {
try {
script = rep.getJobEntryAttributeString( id_jobentry, "script" );
} catch ( KettleDatabaseException dbe ) {
throw new KettleException( BaseMessages.getString( PKG, "JobEntryEval.UnableToLoadFromRepo", String
.valueOf( id_jobentry ) ), dbe );
}
}
// Save the attributes of this job entry
//
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {
try {
rep.saveJobEntryAttribute( id_job, getObjectId(), "script", script );View on GitHub (pinned to f3058517a1)