{"record":{"id":"319799a518c6a4a7","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-cluster-schema-from-the-file-repository","errorCode":null,"errorMessage":"Unable to load cluster schema from the file repository","messagePattern":"Unable to load cluster schema from the file repository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/filerep/KettleFileRepository.java","lineNumber":877,"sourceCode":"  }\n\n  public ObjectId insertTransformationPartitionSchema( ObjectId id_transformation, ObjectId id_partition_schema ) throws KettleException {\n\n    return null;\n  }\n\n  public ObjectId insertTransformationSlave( ObjectId id_transformation, ObjectId id_slave ) throws KettleException {\n\n    return null;\n  }\n\n  @Override\n  public ClusterSchema loadClusterSchema( ObjectId id_cluster_schema, List<SlaveServer> slaveServers,\n    String versionName ) throws KettleException {\n    try {\n      return new ClusterSchema( loadNodeFromXML( id_cluster_schema, ClusterSchema.XML_TAG ), slaveServers );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to load cluster schema from the file repository\", e );\n    }\n  }\n\n  public Condition loadCondition( ObjectId id_condition ) throws KettleException {\n\n    return null;\n  }\n\n  @Override\n  public Condition loadConditionFromStepAttribute( ObjectId id_step, String code ) throws KettleException {\n\n    return null;\n  }\n\n  public Node loadNodeFromXML( ObjectId id, String tag ) throws KettleException {\n    try {\n      // The object ID is the base name of the file in the Base directory folder\n      //","sourceCodeStart":859,"sourceCodeEnd":895,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/filerep/KettleFileRepository.java#L859-L895","documentation":"loadClusterSchema(id, slaveServers, versionName) builds a ClusterSchema from the XML node loaded via loadNodeFromXML; any failure — the node cannot be loaded (missing file/parse error) or the ClusterSchema constructor rejects the XML — is wrapped in this fixed-message KettleException.","triggerScenarios":"Calling loadClusterSchema with an ObjectId whose corresponding file is missing or unreadable, XML does not contain ClusterSchema.XML_TAG, or ClusterSchema's constructor throws while parsing fields (e.g. bad slave references).","commonSituations":"Cluster schema file deleted from the repository while a transformation still references it; hand-edited XML corrupted the node; version-control merge left an invalid cluster schema file in the repo.","solutions":["Verify the cluster schema file for the ObjectId exists under the repository directory","Validate the XML contains a <cluster_schema> node and well-formed content","Recreate the cluster schema in Spoon and re-save it if the XML is corrupted","Check the chained cause to distinguish file loading from constructor parsing failures"],"exampleFix":"// before\nClusterSchema cs = repository.loadClusterSchema(id, slaveServers, null);\n// after\nClusterSchema cs;\ntry {\n  cs = repository.loadClusterSchema(id, slaveServers, null);\n} catch (KettleException e) {\n  cs = defaultClusterSchema(); // fallback or fail fast with context\n}","handlingStrategy":"try-catch","validationCode":"// verify referenced id resolves before loading\nif (id_cluster_schema == null) throw new KettleException(\"No cluster schema id set on transformation\");","typeGuard":null,"tryCatchPattern":"try {\n  ClusterSchema cs = repository.loadClusterSchema(id, slaveServers, null);\n} catch (KettleException e) {\n  logger.error(\"Cluster schema load failed: \" + e.getCause(), e);\n  throw new KettleException(\"Recreate the cluster schema in the repository\", e);\n}","preventionTips":["Do not delete cluster schemas still referenced by transformations","Avoid hand-editing repository XML files","Keep repository files under version control to recover from corruption"],"tags":["file-repository","kettle","cluster-schema","xml"],"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"}