pentaho/pentaho-kettle · error · MetaStoreException
Unable to verify if namespace ''+namespace+'' exists.
Error message
Unable to verify if namespace ''+namespace+'' exists.
What it means
namespaceExists() resolves the namespace id via delegate.getNamespaceId(); if that lookup throws any exception, it is wrapped as MetaStoreException('Unable to verify if namespace X exists.', cause). Note this is distinct from returning false — it signals the existence check itself failed, usually due to a database problem.
Solutions
- Check the wrapped cause for the underlying SQL/connection error
- Verify the repository connection is open and the metastore schema exists (create/upgrade repository)
- Retry after restoring database connectivity
Example fix
// before
boolean exists = metaStore.namespaceExists(ns); // throws on DB outage
// after
boolean exists;
try {
exists = metaStore.namespaceExists(ns);
} catch (MetaStoreException e) {
throw new MetaStoreException("Cannot reach repository metastore: " + e.getCause().getMessage(), e);
} Defensive patterns
Strategy: try-catch
Validate before calling
if (repository == null || !repository.isConnected()) throw new IllegalStateException("Repository not connected"); Try / catch
try { exists = metaStore.namespaceExists(ns); } catch (MetaStoreException e) { throw new MetaStoreException("Metastore unreachable: " + e.getCause().getMessage(), e); } Prevention
- Verify repository connectivity before metastore existence checks
- Create/upgrade the repository so R_NAMESPACE exists
- Treat this error as infrastructure (DB) trouble, not a 'false' answer for existence
When it happens
Trigger: metastore.namespaceExists(name) when the underlying SQL query against R_NAMESPACE throws (connection failure, schema/table missing, SQL syntax/schema mismatch).
Common situations: Repository connection closed or invalid; metastore tables absent because the repository was created by an older Pentaho version; transient DB outage during application startup checks.
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 id of namespace 'namespace'
- Namespace ' ' can not be created, it already exists
- Namespace ' can not be deleted because it is not empty
- Namespace ' ' doesn't exist.
- Namespace ' doesn't exist in the repository
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/5c8d94504fc6ea6e.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/metastore/KettleDatabaseRepositoryMetaStore.java:128
delegate.deleteNamespace( namespaceId );
repository.commit();
} catch ( MetaStoreDependenciesExistsException e ) {
throw e;
} catch ( MetaStoreException e ) {
repository.rollback();
throw e;
} catch ( Exception e ) {
repository.rollback();
throw new MetaStoreException( "Unable to delete namespace '" + namespace + "'", e );
}
}
@Override
public boolean namespaceExists( String namespace ) throws MetaStoreException {
try {
return delegate.getNamespaceId( namespace ) != null;
} catch ( Exception e ) {
throw new MetaStoreException( "Unable to verify if namespace '" + namespace + "' exists.", e );
}
}
// Handle the element types
public void createElementType( String namespace, IMetaStoreElementType elementType ) throws MetaStoreException,
MetaStoreElementTypeExistsException {
try {
ObjectId namespaceId = delegate.verifyNamespace( namespace );
// See if the element already exists in this namespace
//
IMetaStoreElementType existingType = getElementTypeByName( namespace, elementType.getName() );
if ( existingType != null ) {
throw new MetaStoreElementTypeExistsException(
Arrays.asList( existingType ), "Can not create element type with id '"
+ elementType.getId() + "' because it already exists" );View on GitHub (pinned to f3058517a1)