pentaho/pentaho-kettle · error · KettleException
JobMeta.Log.UnableToReadDatabasesFromRepository
Error message
JobMeta.Log.UnableToReadDatabasesFromRepository
What it means
The same readDatabases method also catches a KettleException (not just KettleDatabaseException) raised while processing the repository's database connection definitions and rewraps it with the message 'unable to read databases from the repository'. It signals a higher-level failure (e.g. constructing/looking up a DatabaseMeta failed) during shared-object loading into JobMeta.
Solutions
- Inspect the chained KettleException cause to find which database connection row/definition failed.
- Reinstall the missing database driver/plugin used by the stored connection.
- Fix or remove the broken connection definitions in the repository metadata.
- Ensure repository read occurs after a successful repository connection (databases list available).
Example fix
// before
readDatabases(jobMeta, true); // KettleException from bad connection row
// after
try {
readDatabases(jobMeta, true);
} catch (KettleException e) {
logError("Failed to load shared database connections: " + e.getCause(), e);
// remove/repair offending connection definition in repository, then retry
} Defensive patterns
Strategy: try-catch
Validate before calling
if (!repository.isConnected()) { repository.connect(user, password); }
// ensure all DatabaseMeta plugins used by stored connections are installed before load Try / catch
try {
readSharedObjects(jobMeta);
} catch (KettleException e) {
logError("Shared database connection could not be loaded: " + (e.getCause() != null ? e.getCause().getMessage() : e.getMessage()), e);
// repair/remove the offending connection definition, then retry
} Prevention
- Install the JDBC drivers/plugins for every connection stored in the repository on all installations.
- Audit R_DATABASE rows for obsolete or third-party connection types.
- Recreate stored connections after major version migrations.
- Load shared objects only from a connected, healthy repository.
When it happens
Trigger: Calling readDatabases via repository read/save paths (also readSharedObjects) when database meta lookup/instantiation from repository rows throws KettleException: e.g. a repository DatabaseMeta row references an invalid plugin type or the DatabaseMeta cannot be created.
Common situations: Repository rows for connections created with a plugin no longer installed; malformed connection metadata; missing database driver preventing DatabaseMeta creation while loading shared objects.
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
- JobMeta.Log.UnableToReadDatabaseIDSFromRepository
- AbortMeta.Exception.UnableToSaveStepInfoToRepository
- AccessInputMeta.Exception.ErrorReadingRepository
- AddSequenceMeta.Exception.UnableToReadStepInfo
- AggregateRowsMeta.Exception.UnexpectedErrorWhileReadingStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/7b4c4bf5fdc9227a.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryJobDelegate.java:726
DatabaseMeta check = jobMeta.findDatabase( databaseMeta.getName() );
// We only add, never overwrite database connections.
//
if ( check == null || overWriteShared ) {
if ( databaseMeta.getName() != null ) {
jobMeta.getDatabaseManagementInterface().add( databaseMeta );
if ( !overWriteShared ) {
databaseMeta.setChanged( false );
}
}
}
}
jobMeta.setChanged( false );
} catch ( KettleDatabaseException dbe ) {
throw new KettleException(
BaseMessages.getString( PKG, "JobMeta.Log.UnableToReadDatabaseIDSFromRepository" ), dbe );
} catch ( KettleException ke ) {
throw new KettleException(
BaseMessages.getString( PKG, "JobMeta.Log.UnableToReadDatabasesFromRepository" ), ke );
}
}
/**
* Read the slave servers in the repository and add them to this transformation if they are not yet present.
*
* @param jobMeta
* The job to put the slave servers in
* @param overWriteShared
* if an object with the same name exists, overwrite
* @throws KettleException
*/
public void readSlaves( JobMeta jobMeta, boolean overWriteShared ) throws KettleException {
try {
ObjectId[] dbids = repository.getSlaveIDs( false );
for ( int i = 0; i < dbids.length; i++ ) {
SlaveServer slaveServer = repository.loadSlaveServer( dbids[i], null ); // Load last versionView on GitHub (pinned to f3058517a1)