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
- Verify idDirectory is valid and the folder still exists before calling getDirectoryNames.
- Inspect e.getCause() for the underlying service error (not-found vs permission vs network).
- Refresh the directory tree or reload ObjectIds from the current repository state.
- 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
- Resolve fresh directory ids from the current tree, not cached ones.
- Confirm read access on the folder before listing.
- Handle empty results separately from failures.
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
- PurRepository.FailedDirectoryCreation.Message
- PurRepository.invalidRepositoryDirectory
- Unable to create directory with path [
- Unable to delete directory with path [
- Unable to get all cluster schema IDs
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)