{"record":{"id":"7ef94270ec1a1594","repo":"pentaho/pentaho-kettle","slug":"unable-to-get-all-cluster-schema-names","errorCode":null,"errorMessage":"Unable to get all cluster schema names","messagePattern":"Unable to get all cluster schema names","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java","lineNumber":1011,"sourceCode":"        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 cluster schema IDs\", e );\n    }\n  }\n\n  @Override\n  public String[] getClusterNames( boolean includeDeleted ) throws KettleException {\n    try {\n      List<RepositoryFile> children = getAllFilesOfType( null, RepositoryObjectType.CLUSTER_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 cluster schema names\", e );\n    }\n  }\n\n  @Override\n  public ObjectId getDatabaseID( final String name ) throws KettleException {\n    return getObjectID( name, RepositoryObjectType.DATABASE );\n  }\n\n  private ObjectId getObjectID( String name, RepositoryObjectType type ) throws KettleException {\n    try {\n      ObjectId objectId = getObjectId( name, null, type, false );\n      if ( objectId == null ) {\n        List<RepositoryFile> allFilesOfType = getAllFilesOfType( null, type, false );\n        String[] existingNames = new String[ allFilesOfType.size() ];\n        for ( int i = 0; i < allFilesOfType.size(); i++ ) {\n          RepositoryFile file = allFilesOfType.get( i );\n          existingNames[ i ] = file.getTitle();\n        }","sourceCodeStart":993,"sourceCodeEnd":1029,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java#L993-L1029","documentation":"getClusterNames(boolean) failed: it lists cluster-schema repository files and collects their titles; any exception during the listing is wrapped as this KettleException. It means cluster schema names could not be read from the PUR repository.","triggerScenarios":"Calling getClusterNames(includeDeleted) when the shared-folder children listing throws — unreadable folder, service error, or broken repository metadata.","commonSituations":"Restricted user account browsing shared resources; enterprise repository temporarily unavailable; metadata corruption after an upgrade.","solutions":["Check read permissions on the shared cluster-schema folder for the connected user.","Inspect the wrapped cause and check BA server logs for the listing failure.","Reconnect/re-authenticate and retry the call.","Repair repository metadata via admin tooling if corruption is confirmed."],"exampleFix":"// before\nString[] names = repo.getClusterNames(false);\n// after\nString[] names;\ntry {\n  names = repo.getClusterNames(false);\n} catch (KettleException e) {\n  names = new String[0];\n  log.warn(\"No cluster names: {}\", e.getCause());\n}","handlingStrategy":"fallback","validationCode":"if (!repo.isConnected()) throw new KettleException(\"Repository not connected\");","typeGuard":"null","tryCatchPattern":"try {\n  names = repo.getClusterNames(false);\n} catch (KettleException e) {\n  log.warn(\"Cluster names unavailable: {}\", e.getCause());\n  names = new String[0];\n}","preventionTips":["Verify user permissions on shared cluster-schema folders.","Monitor BA server availability before batch repository reads.","Check server logs for metadata errors after upgrades."],"tags":["repository","cluster-schema","pentaho","listing"],"backgroundTag":"empty-result-set","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"}