{"record":{"id":"17b712425d8d9585","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-partition-schema-from-the-file-repository","errorCode":null,"errorMessage":"Unable to load partition schema from the file repository","messagePattern":"Unable to load partition 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":960,"sourceCode":"    jobMeta.setFilename( null );\n    jobMeta.setName( jobname );\n    jobMeta.setObjectId( new StringObjectId( calcObjectId( repdir, jobname, EXT_JOB ) ) );\n\n    jobMeta.setRepository( this );\n    jobMeta.setMetaStore( MetaStoreConst.getDefaultMetastore() );\n\n    jobMeta.clearChanged();\n\n    return jobMeta;\n\n  }\n\n  @Override\n  public PartitionSchema loadPartitionSchema( ObjectId id_partition_schema, String versionName ) throws KettleException {\n    try {\n      return new PartitionSchema( loadNodeFromXML( id_partition_schema, PartitionSchema.XML_TAG ) );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to load partition schema from the file repository\", e );\n    }\n  }\n\n  @Override\n  public RepositoryDirectoryInterface loadRepositoryDirectoryTree() throws KettleException {\n    RepositoryDirectory root = new RepositoryDirectory();\n    root.setObjectId( new StringObjectId( \"/\" ) );\n    return loadRepositoryDirectoryTree( root );\n  }\n\n  public RepositoryDirectoryInterface loadRepositoryDirectoryTree( RepositoryDirectoryInterface dir ) throws KettleException {\n    try {\n      String folderName = calcDirectoryName( dir );\n      FileObject folder = KettleVFS.getInstance( DefaultBowl.getInstance() ).getFileObject( folderName );\n\n      for ( FileObject child : folder.getChildren() ) {\n        if ( child.getType().equals( FileType.FOLDER ) ) {\n          if ( !child.isHidden() || !repositoryMeta.isHidingHiddenFiles() ) {","sourceCodeStart":942,"sourceCodeEnd":978,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/filerep/KettleFileRepository.java#L942-L978","documentation":"loadPartitionSchema(id, versionName) builds a PartitionSchema from the XML node returned by loadNodeFromXML(id, PartitionSchema.XML_TAG); failures loading or parsing the node are wrapped into this fixed-message KettleException with the original exception as cause.","triggerScenarios":"Calling loadPartitionSchema when the partition schema file for the id is missing/unreadable or its XML is not a valid <partition_schema> node accepted by the PartitionSchema constructor.","commonSituations":"Partition schema referenced by a transformation but deleted from the repository; corrupted XML after a failed save; cluster/market setup where schema files were not copied to the repository location.","solutions":["Check the partition schema file exists in the repository folder for that id","Recreate the partition schema in Spoon and save it","Inspect getCause() for the concrete load or parse error","Validate transformation metadata references point to existing schema ids"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (id_partition_schema == null) throw new KettleException(\"No partition schema id referenced\");","typeGuard":null,"tryCatchPattern":"try {\n  PartitionSchema ps = repository.loadPartitionSchema(id, null);\n} catch (KettleException e) {\n  logger.error(\"Partition schema load failed: \" + e.getCause(), e);\n  throw new KettleException(\"Partition schema missing or corrupt; recreate it in Spoon\", e);\n}","preventionTips":["Verify schema files ship with the repository when migrating environments","Do not delete partition schemas still referenced by transformations","Validate repository XML after merges or manual operations"],"tags":["file-repository","kettle","partition-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"}