pentaho/pentaho-kettle · error · MetaStoreException

The shared objects metadata store doesn't support deleting…

Error message

The shared objects metadata store doesn't support deleting namespaces

What it means

SharedObjectsMetaStore.deleteNamespace() always throws MetaStoreException because the single shared-objects namespace cannot be removed. Deleting it would destroy the store's only namespace, so the operation is deliberately unsupported.

Solutions

  1. Do not call deleteNamespace on SharedObjectsMetaStore
  2. Guard with namespaceExists/instanceof checks and skip deletion for this metastore type
  3. To remove shared objects, delete them individually via deleteElement or edit the shared objects file directly
  4. Use a different IMetaStore implementation if namespace lifecycle management is required

Example fix

// before
metaStore.deleteNamespace( ns );
// after
if ( !( metaStore instanceof SharedObjectsMetaStore ) ) {
  metaStore.deleteNamespace( ns );
}
Defensive patterns

Strategy: validation

Validate before calling

if ( metaStore instanceof SharedObjectsMetaStore ) {
  throw new UnsupportedOperationException( "deleteNamespace is not supported here" );
}

Type guard

boolean supportsNamespaceDeletion = !( metaStore instanceof SharedObjectsMetaStore );

Try / catch

try {
  metaStore.deleteNamespace( ns );
} catch ( MetaStoreException e ) {
  logger.warn( "Namespace {} could not be deleted (read-only metastore)", ns );
}

Prevention

When it happens

Trigger: Any call to SharedObjectsMetaStore.deleteNamespace(namespace), regardless of the namespace argument.

Common situations: Cleanup code that iterates all namespaces and deletes them; generic metastore teardown in tests or migration scripts applied to the shared-objects metastore.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/9ff6b2eaf29048e5. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/shared/SharedObjectsMetaStore.java:62

  public SharedObjectsMetaStore( SharedObjects sharedObjects ) throws MetaStoreException {
    this.sharedObjects = sharedObjects;

    this.databaseElementType = DatabaseMetaStoreUtil.populateDatabaseElementType( this );
  }

  @Override
  public List<String> getNamespaces() throws MetaStoreException {
    return Arrays.asList( PentahoDefaults.NAMESPACE );
  }

  @Override
  public void createNamespace( String namespace ) throws MetaStoreException, MetaStoreNamespaceExistsException {
    throw new MetaStoreException( "The shared objects metadata store doesn't support creating namespaces" );
  }

  @Override
  public void deleteNamespace( String namespace ) throws MetaStoreException, MetaStoreDependenciesExistsException {
    throw new MetaStoreException( "The shared objects metadata store doesn't support deleting namespaces" );
  }

  @Override
  public boolean namespaceExists( String namespace ) throws MetaStoreException {
    return getNamespaces().indexOf( namespace ) >= 0;
  }

  @Override
  public List<IMetaStoreElementType> getElementTypes( String namespace ) throws MetaStoreException {
    return Arrays.asList( databaseElementType );
  }

  @Override
  public List<String> getElementTypeIds( String namespace ) throws MetaStoreException {
    return Arrays.asList( databaseElementType.getId() );
  }

  @Override

View on GitHub (pinned to f3058517a1)