pentaho/pentaho-kettle · error · KettleException
Unable to delete database with name [name]
Error message
Unable to delete database with name [name]
What it means
Repository failure in PurRepository.deleteDatabaseMeta: the database connection file could not be located or deleted (lookup via getPath returned null or the delete call failed). The message includes the database name and wraps the underlying exception.
Solutions
- Verify the repository user has delete permission on the shared databases area.
- Confirm the DatabaseMeta still exists (getDatabaseIDs/getDatabaseNames) before deleting.
- Retry after resolving file locks or versioning checkout state.
- Catch KettleException and surface the cause to the user instead of failing silently.
Example fix
// before
repository.deleteDatabaseMeta(meta.getName());
// after
try {
repository.deleteDatabaseMeta(meta.getName());
} catch (KettleException e) {
logError("Could not delete connection: " + e.getCause(), e);
} Defensive patterns
Strategy: try-catch
Validate before calling
// check existence before delete boolean exists = repository.getDatabaseNames(false) contains meta.getName();
Type guard
boolean deletable = name -> name != null && repositoryExists(name);
Try / catch
try { repository.deleteDatabaseMeta(name); } catch (KettleException e) { log.error("delete failed: " + e.getCause(), e); } Prevention
- Ensure delete permission on /etc/databases for the user.
- Check the DB still exists before attempting deletion.
- Avoid concurrent sessions deleting the same connection.
- Surface the cause exception to end users.
When it happens
Trigger: Calling deleteDatabaseMeta(String) when the repository cannot delete the file — permission denied, file locked/checked out, or the connection doesn't resolve to an existing repository file.
Common situations: Users lacking delete rights on /etc/databases; the database was already deleted in another session; ETC folder write lock held by versioning.
Related errors
- AbsSecurityProvider.ERROR_0002_UNABLE_TO_ACCESS_IS_ALLOWED
- PurRepository.ERROR_0004_DATABASE_UPDATE_ACCESS_DENIED
- Unable to save step information to the repository for…
- AbsSecurityManager.ERROR_0005_INSUFFICIENT_PRIVELEGES
- AbsSecurityProvider.ERROR_0003_UNABLE_TO_ACCESS_GET_ALLOWED_ACTIONS
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/065802dc56888a7f.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java:1522
}
@Override
public void deleteDatabaseMeta( final String databaseName ) throws KettleException {
RepositoryFile fileToDelete = null;
ObjectId idDatabase = null;
try {
readWriteLock.writeLock().lock();
try {
fileToDelete = pur.getFile( getPath( databaseName, null, RepositoryObjectType.DATABASE ) );
idDatabase = new StringObjectId( fileToDelete.getId().toString() );
permanentlyDeleteSharedObject( idDatabase );
removeFromSharedObjectCache( RepositoryObjectType.DATABASE, idDatabase );
} finally {
readWriteLock.writeLock().unlock();
}
} catch ( Exception e ) {
throw new KettleException( "Unable to delete database with name [" + databaseName + "]", e );
}
}
@Override
public long getJobEntryAttributeInteger( ObjectId idJobentry, int nr, String code ) throws KettleException {
// implemented by RepositoryProxy
throw new UnsupportedOperationException();
}
@Override
public String getJobEntryAttributeString( ObjectId idJobentry, int nr, String code ) throws KettleException {
// implemented by RepositoryProxy
throw new UnsupportedOperationException();
}
@Override
public boolean getJobEntryAttributeBoolean( ObjectId arg0, int arg1, String arg2, boolean arg3 )
throws KettleException {View on GitHub (pinned to f3058517a1)