pentaho/pentaho-kettle · error · KettleException
Unable to create directory with path [
Error message
Unable to create directory with path [
What it means
Generic wrapper in PurRepository.createRepositoryDirectory: any exception while walking/creating the path segments under the validated parent is wrapped in a KettleException "Unable to create directory with path [...]" with the original cause chained.
Solutions
- Read e.getCause() to identify whether it is an access-control or connectivity issue.
- Verify write (create) permission on the target parent folder.
- Retry after confirming the folder does not already exist (name conflict).
- Re-authenticate to the repository if the session expired.
Example fix
// before
repo.createRepositoryDirectory(parent, dir);
// after
try { repo.createRepositoryDirectory(parent, dir); } catch (KettleException e) { logger.warn("create failed for {} : {}", path, e.getCause()); } Defensive patterns
Strategy: try-catch
Validate before calling
if (parent == null) throw new IllegalArgumentException("parent directory required"); if (!hasCreatePermission(user, parent.getPath())) throw new SecurityException("no create permission on " + parent.getPath()); Try / catch
try { repo.createRepositoryDirectory(parent, dir); } catch (KettleException e) { log.warn("mkdir {} failed: {}", path, e.getCause()); if (isNameConflict(e.getCause())) reuseExisting(path); } Prevention
- Check create ACLs on the parent before calling
- Handle duplicate folder names by reusing the existing directory
- Refresh directory tree before creating after concurrent edits
When it happens
Trigger: createRepositoryDirectory throws from the underlying pur (unified repository) client — e.g. permission denied on the parent folder, name conflicts, JCR session errors, or a failure in findDirectory/refreshing children while creating a multi-segment path.
Common situations: User lacks write permission on /public or another user's /home; network/session failure to the BA Server; concurrent creation of the same folder by two clients.
Understand the failure class
Background: mkdir permission denied (EACCES): failed to create directory errors explained — this error's family across 32 libraries.
Related errors
- PurRepository.FailedDirectoryCreation.Message
- PurRepository.invalidRepositoryDirectory
- 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/764a61316e1e8817.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java:434
String[] path = Const.splitPath( directoryPath, RepositoryDirectory.DIRECTORY_SEPARATOR );
RepositoryDirectoryInterface follow = parentDirectory;
for ( int level = 0; level < path.length; level++ ) {
RepositoryDirectoryInterface child = follow.findChild( path[level] );
if ( child == null ) {
// 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 ) {View on GitHub (pinned to f3058517a1)