pentaho/pentaho-kettle · error · KettleException
PurRepository.FailedDirectoryCreation.Message
PurRepository.FailedDirectoryCreation.Message
Error message
PurRepository.FailedDirectoryCreation.Message
What it means
saveRepositoryDirectory refuses to save (i.e., create) a directory whose parent is the repository root, since root-level folders are managed by the system. It throws a localized KettleException keyed by PurRepository.FailedDirectoryCreation.Message.
Solutions
- Ensure new directories are created under /home or /public, never as children of root.
- Re-parent the directory to a valid parent before calling saveRepositoryDirectory.
- Use createRepositoryDirectory (which validates /home//public paths) instead of saving a root child.
Example fix
// before
repo.saveRepositoryDirectory(dir); // dir.parent == root
// after
if (!"/".equals(dir.getParent().getName())) { repo.saveRepositoryDirectory(dir); } else { /* re-parent under /public first */ } Defensive patterns
Strategy: validation
Validate before calling
if (dir.getParent() == null || "/".equals(dir.getParent().getName())) throw new IllegalArgumentException("cannot save a directory whose parent is root; re-parent under /home or /public"); Prevention
- Guard parent-is-root before any saveRepositoryDirectory call
- Use createRepositoryDirectory for root-relative path creation
- Restrict UI folder pickers to /home and /public subtrees
When it happens
Trigger: Calling saveRepositoryDirectory(dir) with dir.getParent() being the root (parent name "/") — typically reached from createRepositoryDirectory or UI "new folder" flows when the target parent is root.
Common situations: UI/tooling letting users pick the root as destination for a new folder; programmatic migration code saving directories whose parent is root.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- PurRepository.invalidRepositoryDirectory
- Unable to create directory with path [
- Unable to delete directory with path [
- Unable to get list of object names from directory [
- Unable to save repository directory with path [
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/16265dd1aebd1f43.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java:441
// create this one
child = new RepositoryDirectory( follow, path[level] );
saveRepositoryDirectory( child );
// link this with the parent directory
follow.addSubdirectory( child );
}
follow = child;
}
return follow;
} catch ( Exception e ) {
throw new KettleException( "Unable to create directory with path [" + directoryPath + "]", e );
}
}
@Override public void saveRepositoryDirectory( final RepositoryDirectoryInterface dir ) throws KettleException {
// id of root dir is null--check for it
if ( "/".equals( dir.getParent().getName() ) ) {
throw new KettleException( BaseMessages.getString( PKG, "PurRepository.FailedDirectoryCreation.Message" ) );
}
readWriteLock.writeLock().lock();
try {
RepositoryFile
newFolder =
pur.createFolder( dir.getParent().getObjectId() != null ? dir.getParent().getObjectId().getId() : null,
new RepositoryFile.Builder( dir.getName() ).folder( true ).build(), null );
dir.setObjectId( new StringObjectId( newFolder.getId().toString() ) );
} catch ( Exception e ) {
throw new KettleException( "Unable to save repository directory with path [" + getPath( null, dir, null ) + "]",
e );
} finally {
readWriteLock.writeLock().unlock();
}
}
View on GitHub (pinned to f3058517a1)