{"record":{"id":"3e18d1a4a1056bb8","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-partition-schema-with-id-partitionschemaid","errorCode":null,"errorMessage":"Unable to load partition schema with id [partitionSchemaId]","messagePattern":"Unable to load partition schema with id \\[partitionSchemaId\\]","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java","lineNumber":1917,"sourceCode":"  }\n\n  @Override\n  public PartitionSchema loadPartitionSchema( ObjectId partitionSchemaId, String versionId ) throws KettleException {\n    readWriteLock.readLock().lock();\n    try {\n      NodeRepositoryFileData data =\n        pur.getDataAtVersionForRead( partitionSchemaId.getId(), versionId, NodeRepositoryFileData.class );\n      RepositoryFile file = null;\n      if ( versionId != null ) {\n        file = pur.getFileAtVersion( partitionSchemaId.getId(), versionId );\n      } else {\n        file = pur.getFileById( partitionSchemaId.getId() );\n      }\n\n      return partitionSchemaTransformer.assemble( file, data, pur.getVersionSummary( partitionSchemaId.getId(),\n        versionId ) );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to load partition schema with id [\" + partitionSchemaId + \"]\", e );\n    } finally {\n      readWriteLock.readLock().unlock();\n    }\n  }\n\n  @Override\n  public SlaveServer loadSlaveServer( ObjectId idSlaveServer, String versionId ) throws KettleException {\n    readWriteLock.readLock().lock();\n    try {\n      NodeRepositoryFileData\n        data =\n        pur.getDataAtVersionForRead( idSlaveServer.getId(), versionId, NodeRepositoryFileData.class );\n      RepositoryFile file = null;\n      if ( versionId != null ) {\n        file = pur.getFileAtVersion( idSlaveServer.getId(), versionId );\n      } else {\n        file = pur.getFileById( idSlaveServer.getId() );\n      }","sourceCodeStart":1899,"sourceCodeEnd":1935,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java#L1899-L1935","documentation":"PurRepository.loadPartitionSchema(idPartitionSchema, versionId, ignoreErrors) fetches the partition-schema file and version summary and assembles it via partitionSchemaTransformer; any failure is wrapped in this KettleException.","triggerScenarios":"Calling loadPartitionSchema with an id whose file was deleted or belongs to another repository, an invalid versionId, or when stored node data cannot be assembled by the transformer.","commonSituations":"Caching a partition schema id across repository reconnects; the schema was deleted/moved on the server; versioning service failure; legacy data format incompatibility after a Pentaho upgrade.","solutions":["Inspect e.getCause() to distinguish not-found from transform/data failure.","Reload with a fresh id from getPartitionSchemaIDs() instead of a cached id.","Retry with versionId = null to get the latest version.","Reconnect to the repository and confirm the object exists server-side."],"exampleFix":"// before\nPartitionSchema ps = repo.loadPartitionSchema(cachedId, verId, false);\n// after\ntry {\n  PartitionSchema ps = repo.loadPartitionSchema(cachedId, null, false);\n} catch (KettleException e) {\n  log.warn(\"partition schema load failed: \" + e.getCause());\n  ps = null;\n}","handlingStrategy":"try-catch","validationCode":"// verify the object still exists before loading\nboolean present = Arrays.asList(repo.getPartitionSchemaIDs(dirId)).contains(id);","typeGuard":"boolean loadable(ObjectId id) { return id != null && id.getId() != null && !id.getId().isEmpty(); }","tryCatchPattern":"try { return repo.loadPartitionSchema(id, null, false); } catch (KettleException e) { log.warn(\"partition schema load failed: \", e.getCause()); return null; }","preventionTips":["Invalidate id caches on reconnect","Check cause chain for not-found vs data errors","Verify versioning service health after upgrades"],"tags":["kettle","repository","pur","load","partition-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"}