pentaho/pentaho-kettle · error · KettleException
Unable to save repository directory with path [
Error message
Unable to save repository directory with path [
What it means
Wrapper around the unified repository createFolder call in saveRepositoryDirectory: any failure creating the folder on the server is wrapped as "Unable to save repository directory with path [...]" with the cause chained; the write lock is always released in finally.
Solutions
- Check the chained cause; if it is a duplicate/conflict, pick a unique folder name or reuse the existing folder.
- Refresh the parent directory (findDirectory) to obtain a current ObjectId before saving.
- Verify the user has create-child permission on the parent folder.
- Retry the save after re-authenticating if the session expired.
Example fix
// before repo.saveRepositoryDirectory(dir); // after RepositoryDirectoryInterface fresh = repo.findDirectory(getParentPath(dir.getPath())); dir.setParent(fresh); repo.saveRepositoryDirectory(dir);
Defensive patterns
Strategy: retry
Validate before calling
RepositoryDirectoryInterface fresh = repo.findDirectory(parentPath); if (fresh == null) throw new IllegalStateException("parent missing: " + parentPath); Try / catch
try { repo.saveRepositoryDirectory(dir); } catch (KettleException e) { if (isConflict(e.getCause())) { dir.setName(uniqueName(dir.getName())); repo.saveRepositoryDirectory(dir); } else throw e; } Prevention
- Refresh parent ObjectIds before saving
- Use unique folder names within a parent
- Confirm write permissions outside your own home folder
When it happens
Trigger: pur.createFolder fails — parent ObjectId missing/null unexpectedly, folder name invalid or already exists, user lacks create permission, or a server-side JCR error occurs while creating the folder.
Common situations: Duplicate folder name in the same parent; stale ObjectId on the parent after another client modified the tree; permission denied for non-admin users writing outside their home folder.
Understand the failure class
Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.
Related errors
- PurRepository.FailedDirectoryCreation.Message
- PurRepository.invalidRepositoryDirectory
- Unable to create directory with path [
- Unable to delete directory with path [
- Unable to get list of object names from directory [
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/602b1fbd74ad403f.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java:453
}
}
@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();
}
}
/**
* Determine if "baseFolder" is the same as "folder" or if "folder" is a descendant of "baseFolder"
*
* @param folder
* Folder to test for similarity / ancestory; Must not be null
* @param baseFolder
* Folder that may be the same or an ancestor; Must not be null
* @return True if folder is a descendant of baseFolder or False if not; False if either folder or baseFolder are null
*/
protected boolean isSameOrAncestorFolder( RepositoryFile folder, RepositoryFile baseFolder ) {
// If either folder is null, return false. We cannot do a proper comparison
if ( folder != null && baseFolder != null ) {View on GitHub (pinned to f3058517a1)