pentaho/pentaho-kettle · error · KettleException
An error occured loading the directory tree from the…
Error message
An error occured loading the directory tree from the repository
What it means
Wraps any exception raised while recursively loading the repository directory tree (RepositoryDirectory tree) starting at the root. Any failure walking R_REPOSITORY_LOG/directory rows or building subdirectories is wrapped into this KettleException, with the original exception attached as cause.
Solutions
- Inspect the cause exception for the exact SQL/row failure
- Verify directory rows in the repository directory table for dangling or duplicate ids and repair them
- Reconnect and retry if the repository connection was dropped
- Restore the directory tables from a repository backup if the tree is corrupt
Example fix
// before
RepositoryDirectoryInterface tree = repository.loadRepositoryDirectoryTree(); // wraps any failure
// after: ensure a healthy connection and handle failure gracefully
try {
RepositoryDirectoryInterface tree = repository.loadRepositoryDirectoryTree();
} catch (KettleException e) {
log.error("Directory tree load failed", e.getCause()); // inspect real cause, repair tables
} Defensive patterns
Strategy: try-catch
Validate before calling
// sanity-check directory table for dangling parent links ResultSet rs = stmt.executeQuery( "SELECT COUNT(*) FROM R_REPOSITORY_LOG d WHERE NOT EXISTS (SELECT 1 FROM R_REPOSITORY_LOG p WHERE p.ID_DIRECTORY = d.ID_DIRECTORY_PARENT)");
Try / catch
try {
RepositoryDirectoryInterface tree = repository.loadRepositoryDirectoryTree();
} catch (KettleException e) {
log.error("Directory tree load failed", e.getCause());
// repair directory rows or restore backup, then retry
} Prevention
- Avoid interrupting repository move/delete operations
- Back up directory tables before imports and bulk operations
- Verify parent/child directory ids after any manual repository surgery
When it happens
Trigger: Calling loadRepositoryDirectoryTree() when reading directory rows from the repository tables throws: SQL error, missing directory table, corrupt parent/child id links, or connection failure.
Common situations: Corrupted directory tree after an interrupted delete/move; cyclic or dangling id_directory_parent references from a bad import; repository DB unreachable mid-load; missing privileges on the directory table.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- Error loading database connection from repository
- AbortMeta.Exception.UnableToSaveStepInfoToRepository
- AccessInputMeta.Exception.ErrorReadingRepository
- AddSequenceMeta.Exception.UnableToReadStepInfo
- AggregateRowsMeta.Exception.UnexpectedErrorWhileReadingStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/017d19b67a07b71d.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryDirectoryDelegate.java:100
return repositoryDirectory;
}
public RepositoryDirectoryInterface loadRepositoryDirectoryTree( RepositoryDirectoryInterface root ) throws KettleException {
try {
synchronized ( repository ) {
root.clear();
ObjectId[] subids = repository.getSubDirectoryIDs( root.getObjectId() );
for ( int i = 0; i < subids.length; i++ ) {
RepositoryDirectory subdir = new RepositoryDirectory();
loadRepositoryDirectory( subdir, subids[i] );
root.addSubdirectory( subdir );
}
}
return root;
} catch ( Exception e ) {
throw new KettleException( "An error occured loading the directory tree from the repository", e );
}
}
public void loadRepositoryDirectory( RepositoryDirectory repositoryDirectory, ObjectId id_directory ) throws KettleException {
if ( id_directory == null ) {
// This is the root directory, id = OL
id_directory = new LongObjectId( 0L );
}
try {
RowMetaAndData row = getDirectory( id_directory );
if ( row != null ) {
repositoryDirectory.setObjectId( id_directory );
// Content?
//
repositoryDirectory.setName( row.getString( "DIRECTORY_NAME", null ) );
View on GitHub (pinned to f3058517a1)