pentaho/pentaho-kettle · error · KettleException
Unable to get all database IDs
Error message
Unable to get all database IDs
What it means
PurRepository.getDatabaseIDs() lists all repository files of type DATABASE under the shared-objects root and converts their IDs to Kettle ObjectIds. Any failure in the underlying Pentaho Repository (JCR/PUC) file listing or ID conversion is wrapped in a KettleException with this message.
Solutions
- Verify the pur repository connection is healthy (connect() succeeded, user authenticated).
- Check that the /etc/databases (shared databases) area exists in the repository and the user has read permission.
- Inspect the cause chain of the KettleException for the underlying PentahoRepositoryException.
- Retry after fixing repository/network; fall back to getDatabaseNames() if only names are needed.
Example fix
// before
List<ObjectId> ids = repository.getDatabaseIDs(false);
// after
List<ObjectId> ids;
try {
ids = repository.getDatabaseIDs(false);
} catch (KettleException e) {
logError("Repository unreadable, using empty database list", e);
ids = Collections.emptyList();
} Defensive patterns
Strategy: try-catch
Validate before calling
// ensure connected before listing
if (!repository.isConnected()) { repository.connect(user, pass); }
List<RepositoryFile> dbs = repository.getAllFilesOfType? // n/a; verify via repository.exists(folder) if available Type guard
boolean canList = repository != null && repository.isConnected();
Try / catch
try { ids = repository.getDatabaseIDs(false); } catch (KettleException e) { log.error("db id listing failed", e); ids = new ObjectId[0]; } Prevention
- Always connect and verify repository before repository metadata calls.
- Log e.getCause() — the KettleException is only a wrapper.
- Grant repository users read access to shared settings.
- Use PurRepositoryConnector health checks / connection test in Spoon.
When it happens
Trigger: Calling getDatabaseIDs(boolean) when the repository connection fails, the databases folder is missing/corrupt, or the file service throws while listing children.
Common situations: PDI spoon connecting to a Pentaho repository with network/auth issues; a pur repository where shared database connections were deleted or the folder permissions deny listing.
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
- Unable to get all database names
- ColumnExistsMeta.Exception.UnableToSaveStepInfo
- ColumnExistsMeta.Exception.UnexpectedErrorReadingStepInfo
- CreditCardValidatorMeta.Exception.UnexpectedErrorReadingStepInfo
- CreditCardValidatorMeta.Exception.UnableToSaveStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/97cf0cd1daf33449.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java:1151
} else {
return null;
}
} finally {
readWriteLock.readLock().unlock();
}
}
@Override
public ObjectId[] getDatabaseIDs( boolean includeDeleted ) throws KettleException {
try {
List<RepositoryFile> children = getAllFilesOfType( null, RepositoryObjectType.DATABASE, includeDeleted );
List<ObjectId> ids = new ArrayList<ObjectId>( children.size() );
for ( RepositoryFile file : children ) {
ids.add( new StringObjectId( file.getId().toString() ) );
}
return ids.toArray( new ObjectId[ 0 ] );
} catch ( Exception e ) {
throw new KettleException( "Unable to get all database IDs", e );
}
}
protected List<RepositoryFile> getAllFilesOfType( final ObjectId dirId, final RepositoryObjectType objectType,
final boolean includeDeleted ) throws KettleException {
return getAllFilesOfType( dirId, Collections.singletonList( objectType ), includeDeleted );
}
protected List<RepositoryFile> getAllFilesOfType( final ObjectId dirId, final List<RepositoryObjectType> objectTypes,
final boolean includeDeleted ) throws KettleException {
List<RepositoryFile> allChildren = new ArrayList<RepositoryFile>();
List<RepositoryFile> children = getAllFilesOfType( dirId, objectTypes );
allChildren.addAll( children );
if ( includeDeleted ) {
String dirPath = null;
if ( dirId != null ) {
// derive path using idView on GitHub (pinned to f3058517a1)