{"record":{"id":"9d2141941bee6557","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-cluster-schema-with-id-idclusterschema","errorCode":null,"errorMessage":"Unable to load cluster schema with id [idClusterSchema]","messagePattern":"Unable to load cluster schema with id \\[idClusterSchema\\]","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java","lineNumber":1875,"sourceCode":"  @Override\n  public ClusterSchema loadClusterSchema( ObjectId idClusterSchema, List<SlaveServer> slaveServers, String versionId )\n    throws KettleException {\n    readWriteLock.readLock().lock();\n    try {\n      // We dont need to use slaveServer variable as the dataNoteToElement method finds the server from the repository\n      NodeRepositoryFileData\n        data =\n        pur.getDataAtVersionForRead( idClusterSchema.getId(), versionId, NodeRepositoryFileData.class );\n      RepositoryFile file = null;\n      if ( versionId != null ) {\n        file = pur.getFileAtVersion( idClusterSchema.getId(), versionId );\n      } else {\n        file = pur.getFileById( idClusterSchema.getId() );\n      }\n\n      return clusterTransformer.assemble( file, data, pur.getVersionSummary( idClusterSchema.getId(), versionId ) );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to load cluster schema with id [\" + idClusterSchema + \"]\", e );\n    } finally {\n      readWriteLock.readLock().unlock();\n    }\n  }\n\n  @Override\n  public Condition loadConditionFromStepAttribute( ObjectId idStep, String code ) throws KettleException {\n    // implemented by RepositoryProxy\n    throw new UnsupportedOperationException();\n  }\n\n  @Override\n  public DatabaseMeta loadDatabaseMetaFromJobEntryAttribute( ObjectId idJobentry, String nameCode, int nr,\n                                                             String idCode, List<DatabaseMeta> databases )\n    throws KettleException {\n    throw new UnsupportedOperationException();\n  }\n","sourceCodeStart":1857,"sourceCodeEnd":1893,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java#L1857-L1893","documentation":"PurRepository.loadClusterSchema(idClusterSchema, versionId, ignoreErrors) fetches the file and version data for a cluster schema and assembles it via clusterTransformer; any exception (file not found, data unmarshal, transformer failure) is wrapped in this KettleException.","triggerScenarios":"Calling loadClusterSchema with an ObjectId whose underlying repository file no longer exists (pur.getFileById returns null or throws), with an invalid versionId, or when the stored node data cannot be transformed.","commonSituations":"Cluster schema deleted by another user after the id was cached; shared-object id from a different repository; pur versioning service error; data format from an older Pentaho version that the transformer cannot assemble.","solutions":["Check e.getCause() for EntityNotFoundException vs data/transform failure.","Re-list cluster schemas (getClusterIDs/getClusterNames) and reload by fresh id.","If a versionId was passed, retry with null to load the latest version.","Verify the repository connection and that the object still exists in the Pentaho server."],"exampleFix":"// before\nClusterSchema cs = repo.loadClusterSchema(staleId, someVersionId, false);\n// after\ntry {\n  ClusterSchema cs = repo.loadClusterSchema(staleId, null, false);\n} catch (KettleException e) {\n  log.warn(\"cluster schema \" + staleId + \" unavailable: \" + e.getCause());\n  cs = null; // fall back to re-listing shared objects\n}","handlingStrategy":"try-catch","validationCode":"// verify the object still exists before loading\nboolean present = Arrays.asList(repo.getClusterIDs(dirId)).contains(id);","typeGuard":"boolean loadable(ObjectId id) { return id != null && id.getId() != null && !id.getId().isEmpty(); }","tryCatchPattern":"try { return repo.loadClusterSchema(id, null, false); } catch (KettleException e) { log.warn(\"cluster schema load failed: \", e.getCause()); return null; }","preventionTips":["Reload ids from fresh listings, never long-lived caches","Pass null versionId unless you need a specific version","Confirm object existence server-side after concurrent edits"],"tags":["kettle","repository","pur","load","cluster-schema"],"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"}