{"record":{"id":"28f2f7e4f2099f98","repo":"pentaho/pentaho-kettle","slug":"transmeta-log-unabletoreaddatabasesfromrepository","errorCode":null,"errorMessage":"TransMeta.Log.UnableToReadDatabasesFromRepository","messagePattern":"TransMeta\\.Log\\.UnableToReadDatabasesFromRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryTransDelegate.java","lineNumber":955,"sourceCode":"        databaseMeta.shareVariablesWith( transMeta );\n\n        DatabaseMeta check = transMeta.findDatabase( databaseMeta.getName() ); // Check if there already is one in the\n                                                                               // transformation\n        if ( check == null || overWriteShared ) { // We only add, never overwrite database connections.\n          if ( databaseMeta.getName() != null ) {\n            transMeta.getDatabaseManagementInterface().add( databaseMeta );\n            if ( !overWriteShared ) {\n              databaseMeta.setChanged( false );\n            }\n          }\n        }\n      }\n      transMeta.clearChangedDatabases();\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"TransMeta.Log.UnableToReadDatabaseIDSFromRepository\" ), dbe );\n    } catch ( KettleException ke ) {\n      throw new KettleException(\n        BaseMessages.getString( PKG, \"TransMeta.Log.UnableToReadDatabasesFromRepository\" ), ke );\n    }\n  }\n\n  /**\n   * Read the clusters in the repository and add them to this transformation if they are not yet present.\n   *\n   * @param transMeta\n   *          The transformation to load into.\n   * @param overWriteShared\n   *          if an object with the same name exists, overwrite\n   * @throws KettleException\n   */\n  public void readClusters( TransMeta transMeta, boolean overWriteShared ) throws KettleException {\n    try {\n      ObjectId[] dbids = repository.getClusterIDs( false );\n      for ( int i = 0; i < dbids.length; i++ ) {\n        ClusterSchema clusterSchema = repository.loadClusterSchema( dbids[i], transMeta.getSlaveServers(), null );","sourceCodeStart":937,"sourceCodeEnd":973,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryTransDelegate.java#L937-L973","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Inspect the wrapped ke cause to find which database connection failed to load.","Fix or delete the offending connection row in the repository, then recreate the connection in the UI.","Ensure required JDBC driver jars are on the classpath so connections can be reconstructed.","Align Kettle versions between the client and whatever wrote the shared connections."],"exampleFix":"// before\ntransMeta = repository.loadTransformation(name, dir, monitor, true, null); // wraps load failure\n// after\ntry {\n  transMeta = repository.loadTransformation(name, dir, monitor, true, null);\n} catch (KettleException e) {\n  log.logError(\"Shared DB connection failed to load: \" + e.getCause(), e);\n  // remove/repair the bad shared connection in the repository, then retry\n  throw e;\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { transMeta = repository.loadTransformation(name, dir, monitor, true, null); } catch (KettleException e) { log.logError(\"Shared DB connection load failed: \" + e.getCause(), e); throw e; }","preventionTips":["Audit shared database connections for rows written by incompatible Kettle versions","Keep JDBC drivers on the classpath","Never hand-edit repository connection rows","Inspect the wrapped KettleException cause to identify the bad connection"],"tags":["repository","shared-objects","database-connections","deserialization"],"backgroundTag":"entity-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}