pentaho/pentaho-kettle · error · KettleException

Unable to get list of objects from directory [dirId]

Error message

Unable to get list of objects from directory [dirId]

What it means

PurRepository.getObjects(dirId, objectType...) builds RepositoryObject lists for a directory and wraps any exception in this KettleException including the directory id. Failures come from the pur getChildren/versioning/lock calls during object assembly.

Solutions

  1. Inspect e.getCause() for the underlying pur failure (likely connection or missing folder).
  2. Re-resolve the directory by path (findDirectory) instead of reusing a cached id.
  3. Reconnect to the repository and retry.
  4. Check server/client plugin version compatibility and folder read permissions.

Example fix

// before
List<RepositoryObject> objs = repo.getObjects(staleDirId, false, type);
// after
RepositoryDirectory dir = repo.findDirectory("/public");
List<RepositoryObject> objs = dir != null
    ? repo.getObjects(dir.getObjectId(), false, type)
    : Collections.emptyList();
Defensive patterns

Strategy: try-catch

Validate before calling

RepositoryDirectory dir = repo.findDirectory(path);
if (dir == null) throw new IllegalArgumentException("directory missing: " + path);

Type guard

boolean listable(PurRepository repo, ObjectId dirId) { try { return dirId != null && repo.getDirectory(dirId) != null; } catch (Exception e) { return false; } }

Try / catch

try { return repo.getObjects(dirId, false, type); } catch (KettleException e) { log.error("dir " + dirId + " cause: ", e.getCause()); return Collections.emptyList(); }

Prevention

When it happens

Trigger: Calling getObjects(dirId, includeDeleted, objectType) when the directory lookup fails, files were deleted mid-iteration, version summary retrieval throws, or the repository connection is broken.

Common situations: Referencing a directory id from a previous repository connection; concurrent deletion by another user; Pentaho server version mismatch breaking pur API calls; permission problems on the folder.

Understand the failure class

Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.

Related errors


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

Appendix: source

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

      }
      if ( includeDeleted ) {
        String dirPath = null;
        if ( dirId != null ) {
          // derive path using id
          dirPath = pur.getFileById( dirId.getId() ).getPath();
        }

        List<RepositoryFile> deletedChildren = getAllDeletedFilesOfType( dirPath, objectTypes );
        for ( RepositoryFile file : deletedChildren ) {
          RepositoryLock lock = unifiedRepositoryLockService.getLock( file );
          RepositoryObjectType objectType = getObjectType( file.getName() );
          list.add( new EERepositoryObject( file, repDir, null, objectType, null, lock, true ) );
        }
      }

      return list;
    } catch ( Exception e ) {
      throw new KettleException( "Unable to get list of objects from directory [" + dirId + "]", e );
    } finally {
      readWriteLock.readLock().unlock();
    }
  }

  public static RepositoryObjectType getObjectType( final String filename ) throws KettleException {
    if ( filename.endsWith( RepositoryObjectType.TRANSFORMATION.getExtension() ) ) {
      return RepositoryObjectType.TRANSFORMATION;
    } else if ( filename.endsWith( RepositoryObjectType.JOB.getExtension() ) ) {
      return RepositoryObjectType.JOB;
    } else if ( filename.endsWith( RepositoryObjectType.DATABASE.getExtension() ) ) {
      return RepositoryObjectType.DATABASE;
    } else if ( filename.endsWith( RepositoryObjectType.SLAVE_SERVER.getExtension() ) ) {
      return RepositoryObjectType.SLAVE_SERVER;
    } else if ( filename.endsWith( RepositoryObjectType.CLUSTER_SCHEMA.getExtension() ) ) {
      return RepositoryObjectType.CLUSTER_SCHEMA;
    } else if ( filename.endsWith( RepositoryObjectType.PARTITION_SCHEMA.getExtension() ) ) {
      return RepositoryObjectType.PARTITION_SCHEMA;

View on GitHub (pinned to f3058517a1)