pentaho/pentaho-kettle · error · KettleException
TableExists.Meta.UnableLoadRep
Error message
TableExists.Meta.UnableLoadRep
What it means
JobEntryTableExists.loadRep wraps any KettleDatabaseException thrown while reading tablename, schemaname and the connection attribute from the repository into a KettleException with the localized 'TableExists.Meta.UnableLoadRep' message (with id_jobentry interpolated) and the original as cause. It means repository persistence for this entry could not be read.
Solutions
- Check the chained KettleDatabaseException cause for the real SQL/connection error
- Verify the id_jobentry exists in r_jobentry_attribute with tablename/schemaname/connection rows
- Confirm the referenced database connection exists in the target repository
- Re-save the job entry from Spoon to rewrite its repository attributes
- Test and repair the repository connection before reloading the job
Example fix
// before: load fails after repo migration lost connection rows
entry.loadRep(rep, metaStore, id_jobentry, databases, slaveServers); // throws
// after: guard on existence and restore connection first
DatabaseMeta db = DatabaseMeta.findDatabase(databases, "MY_CONN");
if (db != null) {
entry.loadRep(rep, metaStore, id_jobentry, databases, slaveServers);
} Defensive patterns
Strategy: try-catch
Validate before calling
// Java: verify repository reachability and attribute rows before loadRep
if (rep == null || !rep.isConnected()) {
throw new KettleException("Repository not connected");
} 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("TableExists repo load failed for " + id_jobentry + ": " + e.getCause(), e);
// re-establish repo connection and retry
} Prevention
- Check repository connection health before loading jobs
- Verify attribute rows survive repository migrations
- Ensure referenced database connections exist in the target repository
- Re-save entries in Spoon after cross-repository copies
When it happens
Trigger: Calling loadRep when rep.loadDatabaseMetaFromJobEntryAttribute or the getJobEntryAttributeString calls throw: missing id_jobentry row, broken repository connection, or corrupted connection/id_database reference columns.
Common situations: Repository database upgraded/migrated with attribute rows lost; job copied between repositories where referenced database connection IDs no longer exist; transient DB outage during job load.
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
- GetXMLDataMeta.Exception.ErrorReadingRepository (localized…
- GetXMLDataMeta.Exception.ErrorSavingToRepository (localized…
- StepMeta.Exception.StepCouldNotBeLoaded
- StepMeta.Exception.StepInfoCouldNotBeFound
- StepMeta.Exception.UnableToSaveStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/f85b23f235fcdfa7.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/job/entries/tableexists/JobEntryTableExists.java:108
tablename = XMLHandler.getTagValue( entrynode, "tablename" );
schemaname = XMLHandler.getTagValue( entrynode, "schemaname" );
String dbname = XMLHandler.getTagValue( entrynode, "connection" );
connection = DatabaseMeta.findDatabase( databases, dbname );
} catch ( KettleException e ) {
throw new KettleXMLException( BaseMessages.getString( PKG, "TableExists.Meta.UnableLoadXml" ), e );
}
}
public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
List<SlaveServer> slaveServers ) throws KettleException {
try {
tablename = rep.getJobEntryAttributeString( id_jobentry, "tablename" );
schemaname = rep.getJobEntryAttributeString( id_jobentry, "schemaname" );
connection = rep.loadDatabaseMetaFromJobEntryAttribute( id_jobentry, "connection", "id_database", databases );
} catch ( KettleDatabaseException dbe ) {
throw new KettleException(
BaseMessages.getString( PKG, "TableExists.Meta.UnableLoadRep", "" + id_jobentry ), dbe );
}
}
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {
try {
rep.saveJobEntryAttribute( id_job, getObjectId(), "tablename", tablename );
rep.saveJobEntryAttribute( id_job, getObjectId(), "schemaname", schemaname );
rep.saveDatabaseMetaJobEntryAttribute( id_job, getObjectId(), "connection", "id_database", connection );
} catch ( KettleDatabaseException dbe ) {
throw new KettleException( BaseMessages.getString( PKG, "TableExists.Meta.UnableSaveRep", "" + id_job ), dbe );
}
}
public void setTablename( String tablename ) {
this.tablename = tablename;
}View on GitHub (pinned to f3058517a1)