pentaho/pentaho-kettle · error · MetaStoreException

The shared objects metadata store doesn't support creating…

Error message

The shared objects metadata store doesn't support creating namespaces

What it means

SharedObjectsMetaStore is a read-mostly MetadataStore backed by a fixed shared-objects namespace (PentahoDefaults.NAMESPACE). It intentionally does not allow creating additional namespaces, so createNamespace() always throws MetaStoreException. The store exposes exactly one namespace, no matter what the caller requests.

Solutions

  1. Do not call createNamespace; use the existing PentahoDefaults.NAMESPACE directly
  2. Check namespaceExists() before writing and skip creation if using the shared-objects metastore
  3. Switch to a writable metastore (e.g. MemoryMetaStore for tests or a database-backed metastore) if multiple namespaces are required

Example fix

// before
if ( !metaStore.namespaceExists( ns ) ) metaStore.createNamespace( ns );
// after
if ( metaStore instanceof SharedObjectsMetaStore ) {
  ns = PentahoDefaults.NAMESPACE; // creation unsupported
} else if ( !metaStore.namespaceExists( ns ) ) {
  metaStore.createNamespace( ns );
}
Defensive patterns

Strategy: validation

Validate before calling

if ( metaStore instanceof SharedObjectsMetaStore ) {
  namespace = PentahoDefaults.NAMESPACE; // skip createNamespace
}
if ( !metaStore.namespaceExists( namespace ) ) {
  metaStore.createNamespace( namespace );
}

Type guard

boolean supportsNamespaceCreation = !( metaStore instanceof SharedObjectsMetaStore );

Try / catch

try {
  metaStore.createNamespace( ns );
} catch ( MetaStoreException e ) {
  logger.debug( "Namespace creation unsupported; using existing namespace {}", ns );
}

Prevention

When it happens

Trigger: Any call to SharedObjectsMetaStore.createNamespace("any-name"), e.g. when generic metastore tooling tries to provision a namespace before writing elements.

Common situations: Code written against a generic IMetaStore interface that works with MemoryMetaStore or default PentahoMetaStore, then pointed at the shared-objects metastore; test harnesses that create namespaces upfront.

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/1a5e3221dd0f4a04. Report an issue: GitHub.

Appendix: source

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

  protected IMetaStoreElementType databaseElementType;

  protected SharedObjects sharedObjects;

  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

View on GitHub (pinned to f3058517a1)