pentaho/pentaho-kettle · error · KettleException

Unable to get all partition schema IDs

Error message

Unable to get all partition schema IDs

What it means

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.

Solutions

  1. Check repository connectivity/authentication first.
  2. Verify the partition schemas exist and are readable in the shared settings area.
  3. Inspect the cause chain for the underlying Pentaho repository exception.
  4. Catch KettleException and fall back to an empty partition schema list.

Example fix

// before
ObjectId[] ids = repository.getPartitionSchemaIDs(false);
// after
ObjectId[] ids;
try {
  ids = repository.getPartitionSchemaIDs(false);
} catch (KettleException e) {
  logError("Cannot list partition schemas", e);
  ids = new ObjectId[0];
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (!repository.isConnected()) throw new IllegalStateException("connect first");
// optionally pre-list names to confirm folder readable
String[] names = repository.getPartitionSchemaNames(false);

Type guard

boolean psReadable = repository != null && repository.isConnected();

Try / catch

try { ids = repository.getPartitionSchemaIDs(false); } catch (KettleException e) { log.error("partition schema ids failed", e); ids = new ObjectId[0]; }

Prevention

When it happens

Trigger: Calling getPartitionSchemaIDs(boolean) when the shared partition-schema folder cannot be listed — permissions, deleted folder, or repository service error.

Common situations: Loading shared objects at Spoon startup with partition schemas corrupted; restricted user without read access to shared settings.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/844d123ec7b25660. Report an issue: GitHub.

Appendix: source

Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java:1603

    return repositoryMeta.getName();
  }

  @Override
  public ObjectId getPartitionSchemaID( String name ) throws KettleException {
    return getObjectID( name, RepositoryObjectType.PARTITION_SCHEMA );
  }

  @Override
  public ObjectId[] getPartitionSchemaIDs( boolean includeDeleted ) throws KettleException {
    try {
      List<RepositoryFile> children = getAllFilesOfType( null, RepositoryObjectType.PARTITION_SCHEMA, includeDeleted );
      List<ObjectId> ids = new ArrayList<ObjectId>();
      for ( RepositoryFile file : children ) {
        ids.add( new StringObjectId( file.getId().toString() ) );
      }
      return ids.toArray( new ObjectId[ 0 ] );
    } catch ( Exception e ) {
      throw new KettleException( "Unable to get all partition schema IDs", e );
    }
  }

  @Override
  public String[] getPartitionSchemaNames( boolean includeDeleted ) throws KettleException {
    try {
      List<RepositoryFile> children = getAllFilesOfType( null, RepositoryObjectType.PARTITION_SCHEMA, includeDeleted );
      List<String> names = new ArrayList<String>();
      for ( RepositoryFile file : children ) {
        names.add( file.getTitle() );
      }
      return names.toArray( new String[ 0 ] );
    } catch ( Exception e ) {
      throw new KettleException( "Unable to get all partition schema names", e );
    }
  }

  @Override

View on GitHub (pinned to f3058517a1)