pentaho/pentaho-kettle · error · KettleException
TransMeta.Log.UnableToReadDatabaseIDSFromRepository
Error message
TransMeta.Log.UnableToReadDatabaseIDSFromRepository
What it means
Raised by readDatabases (invoked from readTransSharedObjects) when reading the repository's database connections to attach to the transformation throws a KettleDatabaseException. Wrapped as a KettleException with the TransMeta.Log.UnableToReadDatabaseIDSFromRepository message and the DB cause.
Solutions
- Check the wrapped dbe cause for the failing query on the database-connection tables.
- Verify R_DATABASE (and related) tables exist and are readable by the repository user.
- Repair or recreate repository metadata via the repository repair/upgrade tool.
- Restore repository connectivity and retry loading the transformation's shared objects.
Example fix
// before
transMeta = repository.loadTransformation(name, dir, monitor, true, null); // shared objects load fails
// after
try {
transMeta = repository.loadTransformation(name, dir, monitor, true, null);
} catch (KettleException e) {
log.logError("Could not read shared DB connections: " + e.getCause(), e);
// proceed without shared objects or fix repository and retry
throw e;
} Defensive patterns
Strategy: try-catch
Validate before calling
// sanity check shared DB connections are listable before loading shared objects repository.getDatabaseIDs();
Try / catch
try { transMeta = repository.loadTransformation(name, dir, monitor, true, null); } catch (KettleException e) { if (e.getMessage().contains("UnableToReadDatabaseIDS")) { /* repair repository DB tables */ } throw e; } Prevention
- Run repository upgrade/repair scripts after version upgrades
- Keep R_DATABASE tables readable for the repository user
- Verify DB connectivity before loading shared objects
- Inspect the wrapped dbe for the exact failing query
When it happens
Trigger: KettleDatabaseException while iterating repository database ids/objects (repository.getDatabaseIDs()/getDatabaseObjects) during shared-object loading of a transformation.
Common situations: R_DATABASE table missing or renamed; DB connection dropped while listing shared database connections; corrupted connection rows that fail deserialization.
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
- TransMeta.Log.UnableToReadDatabasesFromRepository
- " + element.getName() + " has a null id
- JobMeta.Log.UnableToReadDatabasesFromRepository
- Must purge files before shared objects
- StepMeta.Exception.StepCouldNotBeLoaded
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/68dc50993e874958.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryTransDelegate.java:952
ObjectId[] dbids = repository.getDatabaseIDs( false );
for ( int i = 0; i < dbids.length; i++ ) {
DatabaseMeta databaseMeta = repository.loadDatabaseMeta( dbids[i], null ); // reads last version
databaseMeta.shareVariablesWith( transMeta );
DatabaseMeta check = transMeta.findDatabase( databaseMeta.getName() ); // Check if there already is one in the
// transformation
if ( check == null || overWriteShared ) { // We only add, never overwrite database connections.
if ( databaseMeta.getName() != null ) {
transMeta.getDatabaseManagementInterface().add( databaseMeta );
if ( !overWriteShared ) {
databaseMeta.setChanged( false );
}
}
}
}
transMeta.clearChangedDatabases();
} catch ( KettleDatabaseException dbe ) {
throw new KettleException( BaseMessages.getString(
PKG, "TransMeta.Log.UnableToReadDatabaseIDSFromRepository" ), dbe );
} catch ( KettleException ke ) {
throw new KettleException(
BaseMessages.getString( PKG, "TransMeta.Log.UnableToReadDatabasesFromRepository" ), ke );
}
}
/**
* Read the clusters in the repository and add them to this transformation if they are not yet present.
*
* @param transMeta
* The transformation to load into.
* @param overWriteShared
* if an object with the same name exists, overwrite
* @throws KettleException
*/
public void readClusters( TransMeta transMeta, boolean overWriteShared ) throws KettleException {
try {View on GitHub (pinned to f3058517a1)