pentaho/pentaho-kettle · error · KettleException
Repository.LoadRepositoryDirectory.ErrorLoading.Exception
Error message
Repository.LoadRepositoryDirectory.ErrorLoading.Exception
What it means
This is a wrapper KettleException thrown by KettleDatabaseRepositoryDirectoryDelegate.loadRepositoryDirectory when any exception occurs while loading a directory's metadata and children from the database repository. The original exception is attached as the cause, so the real failure (SQL error, connection loss, corrupt row) is inside it. The library throws it to normalize all database failures during directory-tree reads into the Kettle exception hierarchy.
Solutions
- Inspect e.getCause() for the real KettleDatabaseException/SQLException and fix that root cause first
- Verify the directory ObjectId still exists (repository.getDirectoryIDs / directory tree refresh) before loading
- Reconnect/reopen the repository connection and retry
- Run repository connection tests and confirm the r_directory table exists and matches the installed schema version
Example fix
// before
RepositoryDirectory dir = repository.loadRepositoryDirectoryTree();
// after
try {
RepositoryDirectory dir = repository.loadRepositoryDirectoryTree();
} catch ( KettleException e ) {
log.error( "Directory load failed", e.getCause() ); // inspect cause, reconnect/retry
} Defensive patterns
Strategy: try-catch
Validate before calling
// pre-check: ensure the directory id resolves in a fresh tree RepositoryDirectoryInterface tree = repository.loadRepositoryDirectoryTree(); if ( tree.findDirectory( dirId ) == null ) throw new IllegalStateException( "Directory no longer exists" );
Type guard
boolean directoryExists( Repository repo, ObjectId id ) {
try { return repo.getDirectoryIDs( RepoDirectoryId.ROOT ).stream().anyMatch( id::equals ); }
catch ( Exception e ) { return false; }
} Try / catch
try {
RepositoryDirectory dir = repository.loadRepositoryDirectoryTree();
} catch ( KettleException e ) {
Throwable cause = e.getCause();
// retry once after reconnect if cause is KettleDatabaseException
} Prevention
- Always inspect getCause() to find the real database error
- Refresh the directory tree before operating on cached ObjectIds
- Monitor repository DB connectivity; reconnect on failure
- Keep repository schema upgraded to match the Kettle version
When it happens
Trigger: Calling loadRepositoryDirectory(id) / loadRepositoryDirectoryTree() / renameDirectory when the underlying repository.selectDirectory/getDirectoryIDs queries fail: invalid or nonexistent directory ObjectId, database connection dropped mid-query, schema mismatch, or corrupt r_directory rows.
Common situations: Repository database went down or connection timed out while browsing the directory tree; referencing a cached/stale ObjectId after another client deleted the directory; repository schema version mismatch after a Pentaho upgrade.
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
- AbortMeta.Exception.UnableToSaveStepInfoToRepository
- AccessInputMeta.Exception.ErrorReadingRepository
- AddSequenceMeta.Exception.UnableToReadStepInfo
- AggregateRowsMeta.Exception.UnexpectedErrorWhileReadingStepInfo
- An error occured loading the directory tree from the…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/1bdf64c1d558be7c.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryDirectoryDelegate.java:129
RowMetaAndData row = getDirectory( id_directory );
if ( row != null ) {
repositoryDirectory.setObjectId( id_directory );
// Content?
//
repositoryDirectory.setName( row.getString( "DIRECTORY_NAME", null ) );
// The sub-directories?
//
ObjectId[] subids = repository.getSubDirectoryIDs( repositoryDirectory.getObjectId() );
for ( int i = 0; i < subids.length; i++ ) {
RepositoryDirectory subdir = new RepositoryDirectory();
loadRepositoryDirectory( subdir, subids[i] );
repositoryDirectory.addSubdirectory( subdir );
}
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString(
PKG, "Repository.LoadRepositoryDirectory.ErrorLoading.Exception" ), e );
}
}
/*
* public synchronized RepositoryDirectory refreshRepositoryDirectoryTree() throws KettleException { try {
* RepositoryDirectory tree = new RepositoryDirectory(); loadRepositoryDirectory(tree, tree.getID());
* repository.setDirectoryTree(tree); return tree; } catch (KettleException e) { repository.setDirectoryTree( new
* RepositoryDirectory() ); throw new KettleException("Unable to read the directory tree from the repository!", e); }
* }
*/
private synchronized ObjectId insertDirectory( ObjectId id_directory_parent, RepositoryDirectoryInterface dir ) throws KettleException {
ObjectId id = repository.connectionDelegate.getNextDirectoryID();
String tablename = KettleDatabaseRepository.TABLE_R_DIRECTORY;
RowMetaAndData table = new RowMetaAndData();
table.addValue( new ValueMetaInteger(View on GitHub (pinned to f3058517a1)