pentaho/pentaho-kettle · error · MetaStoreException

The shared objects metadata store doesn't support updating…

Error message

The shared objects metadata store doesn't support updating element types

What it means

Unsupported-operation sentinel in SharedObjectsMetaStore.updateElementType(): this read-only metadata store backs shared objects (database connections, clusters, slaves) loaded from XML files and explicitly rejects element-type mutation. Any attempt to update an element type hits this guard.

Solutions

  1. Treat element types from this metastore as immutable; do not call updateElementType
  2. If a type's description must change, it must change in the underlying code/default, not at runtime
  3. Use a different metastore implementation when mutable types are needed

Example fix

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

Strategy: validation

Validate before calling

if ( metaStore instanceof SharedObjectsMetaStore ) {
  throw new UnsupportedOperationException( "Element types are immutable here" );
}

Type guard

boolean supportsTypeUpdate = !( metaStore instanceof SharedObjectsMetaStore );

Try / catch

try {
  metaStore.updateElementType( ns, type );
} catch ( MetaStoreException e ) {
  logger.warn( "Element type update unsupported in shared-objects metastore" );
}

Prevention

When it happens

Trigger: Any call to SharedObjectsMetaStore.updateElementType(namespace, elementType), e.g. renaming or editing description of the built-in element type.

Common situations: Generic metastore editors or UI code that allow editing type metadata, 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/6677980f0541401c. Report an issue: GitHub.

Appendix: source

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

  @Override
  public IMetaStoreElementType getElementTypeByName( String namespace, String elementTypeName ) throws MetaStoreException {
    for ( IMetaStoreElementType elementType : getElementTypes( namespace ) ) {
      if ( elementType.getName() != null && elementType.getName().equalsIgnoreCase( elementTypeName ) ) {
        return elementType;
      }
    }
    return null;
  }

  @Override
  public void createElementType( String namespace, IMetaStoreElementType elementType ) throws MetaStoreException,
    MetaStoreElementTypeExistsException {
    throw new MetaStoreException( "The shared objects metadata store doesn't support creating new element types" );
  }

  @Override
  public void updateElementType( String namespace, IMetaStoreElementType elementType ) throws MetaStoreException {
    throw new MetaStoreException( "The shared objects metadata store doesn't support updating element types" );
  }

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

  @Override
  public List<IMetaStoreElement> getElements( String namespace, IMetaStoreElementType elementType ) throws MetaStoreException {
    List<IMetaStoreElement> list = new ArrayList<IMetaStoreElement>();
    for ( SharedObjectInterface sharedObject : sharedObjects.getObjectsMap().values() ) {
      // The databases...
      //
      if ( sharedObject instanceof DatabaseMeta && databaseElementType.getName().equals( elementType.getName() ) ) {
        list.add( DatabaseMetaStoreUtil.populateDatabaseElement( this, (DatabaseMeta) sharedObject ) );
      }
    }

View on GitHub (pinned to f3058517a1)