{"record":{"id":"844d123ec7b25660","repo":"pentaho/pentaho-kettle","slug":"unable-to-get-all-partition-schema-ids","errorCode":null,"errorMessage":"Unable to get all partition schema IDs","messagePattern":"Unable to get all partition schema IDs","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java","lineNumber":1603,"sourceCode":"    return repositoryMeta.getName();\n  }\n\n  @Override\n  public ObjectId getPartitionSchemaID( String name ) throws KettleException {\n    return getObjectID( name, RepositoryObjectType.PARTITION_SCHEMA );\n  }\n\n  @Override\n  public ObjectId[] getPartitionSchemaIDs( boolean includeDeleted ) throws KettleException {\n    try {\n      List<RepositoryFile> children = getAllFilesOfType( null, RepositoryObjectType.PARTITION_SCHEMA, includeDeleted );\n      List<ObjectId> ids = new ArrayList<ObjectId>();\n      for ( RepositoryFile file : children ) {\n        ids.add( new StringObjectId( file.getId().toString() ) );\n      }\n      return ids.toArray( new ObjectId[ 0 ] );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to get all partition schema IDs\", e );\n    }\n  }\n\n  @Override\n  public String[] getPartitionSchemaNames( boolean includeDeleted ) throws KettleException {\n    try {\n      List<RepositoryFile> children = getAllFilesOfType( null, RepositoryObjectType.PARTITION_SCHEMA, includeDeleted );\n      List<String> names = new ArrayList<String>();\n      for ( RepositoryFile file : children ) {\n        names.add( file.getTitle() );\n      }\n      return names.toArray( new String[ 0 ] );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to get all partition schema names\", e );\n    }\n  }\n\n  @Override","sourceCodeStart":1585,"sourceCodeEnd":1621,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java#L1585-L1621","documentation":"PurRepository.getPartitionSchemaIDs(boolean) lists PARTITION_SCHEMA-type files and maps IDs to StringObjectIds; any failure in the repository listing is wrapped in a KettleException with this message.","triggerScenarios":"Calling getPartitionSchemaIDs(boolean) when the shared partition-schema folder cannot be listed — permissions, deleted folder, or repository service error.","commonSituations":"Loading shared objects at Spoon startup with partition schemas corrupted; restricted user without read access to shared settings.","solutions":["Check repository connectivity/authentication first.","Verify the partition schemas exist and are readable in the shared settings area.","Inspect the cause chain for the underlying Pentaho repository exception.","Catch KettleException and fall back to an empty partition schema list."],"exampleFix":"// before\nObjectId[] ids = repository.getPartitionSchemaIDs(false);\n// after\nObjectId[] ids;\ntry {\n  ids = repository.getPartitionSchemaIDs(false);\n} catch (KettleException e) {\n  logError(\"Cannot list partition schemas\", e);\n  ids = new ObjectId[0];\n}","handlingStrategy":"try-catch","validationCode":"if (!repository.isConnected()) throw new IllegalStateException(\"connect first\");\n// optionally pre-list names to confirm folder readable\nString[] names = repository.getPartitionSchemaNames(false);","typeGuard":"boolean psReadable = repository != null && repository.isConnected();","tryCatchPattern":"try { ids = repository.getPartitionSchemaIDs(false); } catch (KettleException e) { log.error(\"partition schema ids failed\", e); ids = new ObjectId[0]; }","preventionTips":["Connect and authenticate before listing shared objects.","Ensure read permissions on shared settings folders.","Log the wrapped cause for root-cause analysis.","Keep partition schema files intact in the repository."],"tags":["repository","kettle","partition-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"}