pentaho/pentaho-kettle · error · KettleException

TransMeta.Log.UnableToReadDatabasesFromRepository

Error message

TransMeta.Log.UnableToReadDatabasesFromRepository

What it means

The second catch in readDatabases: a KettleException (already wrapped, e.g. from reading/deserializing database connection objects) is rewrapped with the TransMeta.Log.UnableToReadDatabasesFromRepository message. Unlike 1098 this is not a raw DB failure but a higher-level repository error encountered while loading the transformation's database connections.

Solutions

  1. Inspect the wrapped ke cause to find which database connection failed to load.
  2. Fix or delete the offending connection row in the repository, then recreate the connection in the UI.
  3. Ensure required JDBC driver jars are on the classpath so connections can be reconstructed.
  4. Align Kettle versions between the client and whatever wrote the shared connections.

Example fix

// before
transMeta = repository.loadTransformation(name, dir, monitor, true, null); // wraps load failure
// after
try {
  transMeta = repository.loadTransformation(name, dir, monitor, true, null);
} catch (KettleException e) {
  log.logError("Shared DB connection failed to load: " + e.getCause(), e);
  // remove/repair the bad shared connection in the repository, then retry
  throw e;
}
Defensive patterns

Strategy: try-catch

Try / catch

try { transMeta = repository.loadTransformation(name, dir, monitor, true, null); } catch (KettleException e) { log.logError("Shared DB connection load failed: " + e.getCause(), e); throw e; }

Prevention

When it happens

Trigger: KettleException thrown while reading shared database connections during readTransSharedObjects — e.g. getDatabaseObjects failing to reconstruct a DatabaseMeta from repository rows (invalid XML/config in a connection row).

Common situations: A database connection stored by a different Kettle version with attributes the current version cannot parse; manually edited repository rows; missing driver classes when rebuilding DatabaseMeta objects.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/28f2f7e4f2099f98. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryTransDelegate.java:955

        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 {
      ObjectId[] dbids = repository.getClusterIDs( false );
      for ( int i = 0; i < dbids.length; i++ ) {
        ClusterSchema clusterSchema = repository.loadClusterSchema( dbids[i], transMeta.getSlaveServers(), null );

View on GitHub (pinned to f3058517a1)