pentaho/pentaho-kettle · error · KettleException
TableExists.Meta.UnableSaveRep
Error message
TableExists.Meta.UnableSaveRep
What it means
JobEntryTableExists.saveRep wraps any KettleDatabaseException thrown while persisting tablename, schemaname and the connection database meta into a KettleException with the localized 'TableExists.Meta.UnableSaveRep' message (id_job interpolated) and the original as cause. It means the entry's attributes could not be written to the repository.
Solutions
- Inspect the chained KettleDatabaseException cause for the exact SQL error
- Verify the repository account has write privileges and is not in read-only mode
- Ensure the job/entry ObjectIds are valid by saving the whole job via Spoon
- Retry after confirming repository connectivity; check for table locks from stale sessions
- Shorten tablename/schemaname values if a column-length limit is reported
Example fix
// before: entry detached from job, getObjectId() null rep.saveJobEntryAttribute(id_job, getObjectId(), "tablename", tablename); // throws // after: add the entry to the job and save the job so IDs are assigned job.addJobEntry(entry); job.saveRep(rep, metaStore, id_job);
Defensive patterns
Strategy: try-catch
Validate before calling
// Java: preconditions before saveRep
if (rep == null || !rep.isConnected() || getObjectId() == null) {
throw new KettleException("Repository unavailable or entry not persisted");
} Type guard
if (id_job != null && getObjectId() != null) { /* safe to saveRep */ } Try / catch
try {
entry.saveRep(rep, metaStore, id_job);
} catch (KettleException e) {
logError("TableExists repo save failed: " + e.getCause(), e);
// check permissions/locks, then retry once
} Prevention
- Grant repository write access to the saving user
- Save via Spoon so ObjectIds are valid
- Watch for stale DB sessions holding locks on attribute tables
- Keep tablename/schemaname within column length limits
When it happens
Trigger: Calling saveRep when saveJobEntryAttribute or saveDatabaseMetaJobEntryAttribute throws: repository read-only, lost connection, invalid ObjectId, or constraint violation on the attribute columns.
Common situations: Repository user lacks write permission; saving concurrently from two Spoon sessions causing locks; database connection meta being saved references missing shared objects; disk/quota limits on the repository DB.
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/4c634c34848cee0c.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/job/entries/tableexists/JobEntryTableExists.java:120
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;
}
public String getTablename() {
return tablename;
}
public String getSchemaname() {
return schemaname;
}
public void setSchemaname( String schemaname ) {
this.schemaname = schemaname;
}View on GitHub (pinned to f3058517a1)