pentaho/pentaho-kettle · error · KettleException

Unable to get list of object names from directory [

Error message

Unable to get list of object names from directory [

What it means

getDirectoryNames(ObjectId) failed: it reads the children of the given directory and collects names of child folders; any exception in that lookup is wrapped in this KettleException. It indicates the child list for the directory could not be retrieved from the PUR repository.

Solutions

  1. Verify idDirectory is valid and the folder still exists before calling getDirectoryNames.
  2. Inspect e.getCause() for the underlying service error (not-found vs permission vs network).
  3. Refresh the directory tree or reload ObjectIds from the current repository state.
  4. Reconnect/re-authenticate to the PUR repository if the session expired.

Example fix

// before
String[] names = repo.getDirectoryNames(dirId);
// after
String[] names = repo.getDirectoryNames(dirId); // guard first:
if (repo.getRepositoryDirectoryTree().findDirectory(dirId) != null) {
  names = repo.getDirectoryNames(dirId);
}
Defensive patterns

Strategy: validation

Validate before calling

RepositoryDirectoryInterface dir = repo.getRepositoryDirectoryTree().findDirectory(idDirectory);
if (dir == null) throw new KettleException("Directory not found: " + idDirectory);

Type guard

null

Try / catch

try {
  return repo.getDirectoryNames(idDirectory);
} catch (KettleException e) {
  log.error("Listing failed for {}: {}", idDirectory, e.getCause());
  return new String[0];
}

Prevention

When it happens

Trigger: Calling getDirectoryNames(idDirectory) when the underlying directory lookup (getFolderChildren / repo browse) throws — e.g. invalid idDirectory, deleted folder, or PUR service failure.

Common situations: Using a stale ObjectId from a previous session after the folder was deleted; browsing a folder the user has no read access to; connection problems with the enterprise repository.

Related errors


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

Appendix: source

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

  public String[] getDirectoryNames( final ObjectId idDirectory ) throws KettleException {
    try {
      readWriteLock.readLock().lock();
      List<RepositoryFile> children;
      try {
        children = pur.getChildren( idDirectory.getId() );
      } finally {
        readWriteLock.readLock().unlock();
      }

      List<String> childNames = new ArrayList<String>();
      for ( RepositoryFile child : children ) {
        if ( child.isFolder() ) {
          childNames.add( child.getName() );
        }
      }
      return childNames.toArray( new String[ 0 ] );
    } catch ( Exception e ) {
      throw new KettleException( "Unable to get list of object names from directory [" + idDirectory + "]", e );
    }
  }

  @Override
  public void deleteClusterSchema( ObjectId idCluster ) throws KettleException {
    permanentlyDeleteSharedObject( idCluster );
    removeFromSharedObjectCache( RepositoryObjectType.CLUSTER_SCHEMA, idCluster );
  }

  @Override
  public void deleteJob( ObjectId idJob ) throws KettleException {
    deleteFileById( idJob );
  }

  protected void permanentlyDeleteSharedObject( final ObjectId id ) throws KettleException {
    try {
      readWriteLock.writeLock().lock();
      try {

View on GitHub (pinned to f3058517a1)