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

  1. Check the wrapped dbe cause for the failing query on the database-connection tables.
  2. Verify R_DATABASE (and related) tables exist and are readable by the repository user.
  3. Repair or recreate repository metadata via the repository repair/upgrade tool.
  4. 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

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


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)