pentaho/pentaho-kettle · error · KettleException
ERROR_0002_Cannot_Load_Job_From_Repository
ERROR_0002_Cannot_Load_Job_From_Repository
Error message
JobEntryTalendJobExec.ERROR_0002_Cannot_Load_Job_From_Repository
What it means
JobEntryTalendJobExec.loadRep reads filename and class_name attributes from the repository; any KettleException is rethrown as a KettleException with the code-tagged message 'JobEntryTalendJobExec.ERROR_0002_Cannot_Load_Job_From_Repository' (id_jobentry interpolated) and the original as cause. It indicates the entry's repository record could not be loaded.
Solutions
- Check the chained KettleException/dbe cause for the root database error
- Verify id_jobentry has filename and class_name rows in r_jobentry_attribute
- Confirm repository connectivity and credentials, then reload the job
- Re-save the entry from Spoon to recreate missing attribute rows
- Migrate repository content consistently between source and target repositories
Example fix
// before: loading entry whose rows were dropped in migration
entry.loadRep(rep, metaStore, id_jobentry, databases, slaveServers); // throws
// after: verify rows exist (or recreate via Spoon save) before loading
if (rep.getJobEntryAttributeString(id_jobentry, "filename") != null) {
entry.loadRep(rep, metaStore, id_jobentry, databases, slaveServers);
} Defensive patterns
Strategy: try-catch
Validate before calling
// Java: confirm repository session and entry id before loadRep
if (rep == null || !rep.isConnected() || id_jobentry == null) {
throw new KettleException("Repository not ready or missing id_jobentry");
} Type guard
if (id_jobentry != null && rep != null && rep.isConnected()) { /* safe to loadRep */ } Try / catch
try {
entry.loadRep(rep, metaStore, id_jobentry, databases, slaveServers);
} catch (KettleException e) {
logError("ERROR_0002 for " + id_jobentry + ": " + e.getCause(), e);
// reconnect/re-login to repository and retry
} Prevention
- Verify repository connectivity before opening jobs
- Confirm filename/class_name attribute rows after migrations
- Avoid referencing entries across mismatched repositories
- Re-save entries in Spoon to recreate missing attribute rows
When it happens
Trigger: Calling loadRep when rep.getJobEntryAttributeString throws for filename or class_name: nonexistent id_jobentry, repository connection failure, or corrupted/locked attribute rows.
Common situations: Repository database migrated with attribute data lost; job entry referenced across repositories with mismatched IDs; transient DB outage or expired session while opening the job.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- Could not retrieve version history of object with path
- DELETE_JOB : repository is read-only
- " + element.getName() + " has a null id
- ERROR_0001_Cannot_Load_Job_Entry_From_Xml_Node
- FuzzyMatchMeta.Exception.UnexpecteErrorReadingStepInfoFromRe…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/93baafdb6bf870b8.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/job/entries/talendjobexec/JobEntryTalendJobExec.java:116
public void loadXML( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers,
Repository rep, IMetaStore metaStore ) throws KettleXMLException {
try {
super.loadXML( entrynode, databases, slaveServers );
filename = XMLHandler.getTagValue( entrynode, "filename" );
className = XMLHandler.getTagValue( entrynode, "class_name" );
} catch ( KettleXMLException xe ) {
throw new KettleXMLException( BaseMessages.getString(
PKG, "JobEntryTalendJobExec.ERROR_0001_Cannot_Load_Job_Entry_From_Xml_Node" ), xe );
}
}
public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
List<SlaveServer> slaveServers ) throws KettleException {
try {
filename = rep.getJobEntryAttributeString( id_jobentry, "filename" );
className = rep.getJobEntryAttributeString( id_jobentry, "class_name" );
} catch ( KettleException dbe ) {
throw new KettleException( BaseMessages.getString(
PKG, "JobEntryTalendJobExec.ERROR_0002_Cannot_Load_Job_From_Repository", id_jobentry ), dbe );
}
}
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {
try {
rep.saveJobEntryAttribute( id_job, getObjectId(), "filename", filename );
rep.saveJobEntryAttribute( id_job, getObjectId(), "class_name", className );
} catch ( KettleDatabaseException dbe ) {
throw new KettleException( BaseMessages.getString(
PKG, "JobEntryTalendJobExec.ERROR_0003_Cannot_Save_Job_Entry", id_job ), dbe );
}
}
public void setFilename( String filename ) {
this.filename = filename;
}
View on GitHub (pinned to f3058517a1)