pentaho/pentaho-kettle · error · MetaStoreException

Unable to get list of element types for namespace

Error message

Unable to get list of element types for namespace '<namespace>'

What it means

Generic wrapper thrown by getElementTypes when any exception occurs while listing element types of a namespace in the database repository metastore (delegate parse failures, missing rows, repository connection problems). The original exception is attached as the cause. It signals the list operation failed server/repository-side, not that the namespace is simply empty.

Solutions

  1. Inspect the cause exception (getCause()) to see the underlying JDBC/parse error and fix that first.
  2. Reconnect or re-log in to the Kettle repository; verify the repository database is reachable.
  3. Check repository table integrity (R_ELEMENT_TYPE / R_NAMESPACE) for orphan rows; clean them via repository maintenance tools.
  4. Ensure Pentaho/Kettle versions match between client and repository schema (run repository upgrade if needed).

Example fix

// before
List<IMetaStoreElementType> types = metastore.getElementTypes(namespace); // throws

// after
try {
  List<IMetaStoreElementType> types = metastore.getElementTypes(namespace);
} catch (MetaStoreException e) {
  log.error("List failed: " + e.getCause(), e); // fix underlying JDBC/parse issue
}
Defensive patterns

Strategy: try-catch

Validate before calling

// verify repository connectivity first
repository.isConnected();

Try / catch

try {
  return metastore.getElementTypes(namespace);
} catch (MetaStoreException e) {
  throw new RuntimeException("Repository listing failed: " + e.getCause(), e);
}

Prevention

When it happens

Trigger: Calling getElementTypes(namespace) (or the convenience elementTypes()) when delegate.parseElementType fails on a row, the namespaceId lookup fails, or the repository database query throws — e.g. broken repository connection or corrupted R_ELEMENT_TYPE rows.

Common situations: Repository database was upgraded/changed out of sync with the Pentaho version; a partially deleted namespace leaves orphan rows that fail to parse; transient JDBC connection loss during listing; browsing namespaces in Spoon with a stale repository connection.

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


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/metastore/KettleDatabaseRepositoryMetaStore.java:184

  @Override
  public List<IMetaStoreElementType> getElementTypes( String namespace ) throws MetaStoreException {
    try {
      LongObjectId namespaceId = delegate.getNamespaceId( namespace );
      if ( namespaceId == null ) {
        return new ArrayList<IMetaStoreElementType>();
      }

      Collection<RowMetaAndData> elementTypeRows = delegate.getElementTypes( namespaceId );

      List<IMetaStoreElementType> list = new ArrayList<IMetaStoreElementType>();
      for ( RowMetaAndData elementTypeRow : elementTypeRows ) {
        KDBRMetaStoreElementType elementType = delegate.parseElementType( namespace, namespaceId, elementTypeRow );
        list.add( elementType );
      }

      return list;
    } catch ( Exception e ) {
      throw new MetaStoreException( "Unable to get list of element types for namespace '" + namespace + "'", e );
    }

  }

  @Override
  public List<String> getElementTypeIds( String namespace ) throws MetaStoreException {
    List<IMetaStoreElementType> elementTypes = getElementTypes( namespace );
    ArrayList<String> ids = new ArrayList<String>();
    for ( IMetaStoreElementType elementType : elementTypes ) {
      ids.add( elementType.getId() );
    }
    return ids;
  }

  @Override
  public IMetaStoreElementType getElementType( String namespace, String elementTypeId ) throws MetaStoreException {
    try {

View on GitHub (pinned to f3058517a1)