{"record":{"id":"bc8b7225e3ec5947","repo":"pentaho/pentaho-kettle","slug":"transmeta-log-unabletoreadclustersfromrepository","errorCode":null,"errorMessage":"TransMeta.Log.UnableToReadClustersFromRepository","messagePattern":"TransMeta\\.Log\\.UnableToReadClustersFromRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryTransDelegate.java","lineNumber":987,"sourceCode":"  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 );\n        clusterSchema.shareVariablesWith( transMeta );\n        // Check if there already is one in the transformation\n        ClusterSchema check = transMeta.findClusterSchema( clusterSchema.getName() );\n        if ( check == null || overWriteShared ) {\n          if ( !Utils.isEmpty( clusterSchema.getName() ) ) {\n            transMeta.addOrReplaceClusterSchema( clusterSchema );\n            if ( !overWriteShared ) {\n              clusterSchema.setChanged( false );\n            }\n          }\n        }\n      }\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException(\n        BaseMessages.getString( PKG, \"TransMeta.Log.UnableToReadClustersFromRepository\" ), dbe );\n    }\n  }\n\n  /**\n   * Read the partitions 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 readPartitionSchemas( TransMeta transMeta, boolean overWriteShared ) throws KettleException {\n    try {\n      ObjectId[] dbids = repository.getPartitionSchemaIDs( false );\n      for ( int i = 0; i < dbids.length; i++ ) {\n        PartitionSchema partitionSchema = repository.loadPartitionSchema( dbids[i], null ); // Load last version","sourceCodeStart":969,"sourceCodeEnd":1005,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryTransDelegate.java#L969-L1005","documentation":"Thrown by readClusters() in the KettleDatabaseRepositoryTransDelegate when reading cluster schemas (partitioned cluster definitions) for a transformation from the database repository fails with a KettleDatabaseException. It wraps the low-level JDBC/repository error in a KettleException with this message. It is part of the shared-objects loading step invoked via readTransSharedObjects().","triggerScenarios":"Calling TransMeta loading from a KettleDatabaseRepository (readTransSharedObjects -> readClusters) when the underlying query on R_CLUSTER / R_CLUSTER_SLAVE tables fails: table missing, connection dropped, SQL syntax/permission error, or corrupted cluster rows.","commonSituations":"Repository schema out of date (created with a different Kettle version), database user lacking SELECT grants on cluster tables, network drop mid-load, or manually edited repository tables.","solutions":["Verify database connectivity and that the repository tables (R_CLUSTER, R_CLUSTER_SLAVE) exist and are reachable","Run the repository upgrade/repair tools so the schema matches your Pentaho version","Grant the repository DB user SELECT privileges on the cluster tables","Check the wrapped KettleDatabaseException (cause) for the exact SQL error and fix accordingly"],"exampleFix":"// before\nTransMeta transMeta = new TransMeta(rep, transName, directory);\n// cluster load throws KettleException\n\n// after\ntry {\n  TransMeta transMeta = new TransMeta(rep, transName, directory);\n} catch (KettleException e) {\n  logError(\"Failed to read clusters from repository: \" + e.getCause(), e);\n  // repair repository schema / reconnect, then retry\n}","handlingStrategy":"try-catch","validationCode":"// Java: verify repository connectivity and tables before loading\nDatabaseMeta dbMeta = repository.getDatabaseMeta();\nif (!dbMeta.testConnection(logger).toUpperCase().contains(\"OK\")) {\n  throw new IllegalStateException(\"Repository DB unreachable\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  transMeta = rep.loadTransformation(...);\n} catch (KettleException e) {\n  log.warn(\"Cluster schema load failed: \" + e.getCause(), e);\n  transMeta = new TransMeta(); // fall back / repair repo, retry\n}","preventionTips":["Keep the repository schema upgraded to match your Pentaho version","Test repository connections before bulk-loading transformations","Grant repository DB users read access to all R_* tables","Log and inspect the cause chain, not just the top-level message"],"tags":["database","repository","kettle","cluster-schema"],"backgroundTag":"database-query-failed","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"}