pentaho/pentaho-kettle · error · KettleException
Unable to load database with id [" + databaseId + "]
Error message
Unable to load database with id [" + databaseId + "]
What it means
Thrown by PurRepository.loadDatabase when loading a DatabaseMeta by ObjectId fails — either the file lookup (getFile/getFileById), data fetch, version summary, or transformation into a DatabaseMeta throws. The original exception is wrapped as a KettleException.
Solutions
- Verify the database connection still exists in the repository and refresh shared objects
- Re-obtain a fresh ObjectId via repository.getDatabaseID(name)
- Check server connectivity and permissions, then retry
Example fix
// before
ObjectId id = oldCachedId;
DatabaseMeta db = repository.loadDatabase(id, null, null);
// after
ObjectId id = repository.getDatabaseID("MyConnection");
if (id != null) {
DatabaseMeta db = repository.loadDatabase(id, null, null);
} Defensive patterns
Strategy: try-catch
Validate before calling
ObjectId id = repository.getDatabaseID(name);
if (id == null) throw new IllegalStateException("Database not found in repository: " + name); Try / catch
try {
DatabaseMeta db = repository.loadDatabase(id, null, null);
} catch (KettleException e) {
log.error("Failed to load database " + id + ": " + e.getCause(), e);
// refresh shared object cache and retry
} Prevention
- Always fetch fresh ObjectIds instead of caching across sessions
- Refresh the shared-objects cache after other users modify connections
- Verify repository connectivity before loading
When it happens
Trigger: PurRepository.loadDatabase(databaseId, revision, versionLabel) with an ID pointing to a deleted or inaccessible file, or a corrupt/transformer-incompatible repository file.
Common situations: Stale ObjectIds cached in Spoon after someone deleted the connection; shared-object cache referencing purged files; repository server temporarily unavailable.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- AbsSecurityProvider.ERROR_0002_UNABLE_TO_ACCESS_IS_ALLOWED
- AddSequenceMeta.Exception.UnableToReadStepInfo
- AddSequenceMeta.Exception.UnableToSaveStepInfo
- Error loading job details
- File is currently locked by another user for editing
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/b6e5326ebec0bd17.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java:2416
public DatabaseMeta loadDatabaseMeta( final ObjectId databaseId, final String versionId )
throws KettleException {
readWriteLock.readLock().lock();
try {
NodeRepositoryFileData
data =
pur.getDataAtVersionForRead( databaseId.getId(), versionId, NodeRepositoryFileData.class );
RepositoryFile file = null;
if ( versionId != null ) {
file = pur.getFileAtVersion( databaseId.getId(), versionId );
} else {
file = pur.getFileById( databaseId.getId() );
}
return databaseMetaTransformer.assemble( file, data, pur.getVersionSummary( databaseId.getId(), versionId ) );
} catch ( Exception e ) {
throw new KettleException( "Unable to load database with id [" + databaseId + "]", e );
} finally {
readWriteLock.readLock().unlock();
}
}
@Override
public TransMeta loadTransformation( final String transName, final RepositoryDirectoryInterface parentDir,
final ProgressMonitorListener monitor, final boolean setInternalVariables,
final String versionId )
throws KettleException {
return loadTransformation( this.getBowl(), transName, parentDir, monitor, setInternalVariables, versionId, null );
}
@Override
public TransMeta loadTransformation( final Bowl bowl, final String transName, final RepositoryDirectoryInterface parentDir,
final ProgressMonitorListener monitor, final boolean setInternalVariables,
final String versionId, VariableSpace parent )
throws KettleException {View on GitHub (pinned to f3058517a1)