{"record":{"id":"dde4d17369dc5e42","repo":"pentaho/pentaho-kettle","slug":"unable-to-get-list-of-element-types-for-namespace-namespace","errorCode":null,"errorMessage":"Unable to get list of element types for namespace '<namespace>'","messagePattern":"Unable to get list of element types for namespace '<namespace>'","errorType":"exception","errorClass":"MetaStoreException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/kdr/delegates/metastore/KettleDatabaseRepositoryMetaStore.java","lineNumber":184,"sourceCode":"  @Override\n  public List<IMetaStoreElementType> getElementTypes( String namespace ) throws MetaStoreException {\n    try {\n      LongObjectId namespaceId = delegate.getNamespaceId( namespace );\n      if ( namespaceId == null ) {\n        return new ArrayList<IMetaStoreElementType>();\n      }\n\n      Collection<RowMetaAndData> elementTypeRows = delegate.getElementTypes( namespaceId );\n\n      List<IMetaStoreElementType> list = new ArrayList<IMetaStoreElementType>();\n      for ( RowMetaAndData elementTypeRow : elementTypeRows ) {\n        KDBRMetaStoreElementType elementType = delegate.parseElementType( namespace, namespaceId, elementTypeRow );\n        list.add( elementType );\n      }\n\n      return list;\n    } catch ( Exception e ) {\n      throw new MetaStoreException( \"Unable to get list of element types for namespace '\" + namespace + \"'\", e );\n    }\n\n  }\n\n  @Override\n  public List<String> getElementTypeIds( String namespace ) throws MetaStoreException {\n    List<IMetaStoreElementType> elementTypes = getElementTypes( namespace );\n    ArrayList<String> ids = new ArrayList<String>();\n    for ( IMetaStoreElementType elementType : elementTypes ) {\n      ids.add( elementType.getId() );\n    }\n    return ids;\n  }\n\n  @Override\n  public IMetaStoreElementType getElementType( String namespace, String elementTypeId ) throws MetaStoreException {\n    try {\n","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/kdr/delegates/metastore/KettleDatabaseRepositoryMetaStore.java#L166-L202","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Inspect the cause exception (getCause()) to see the underlying JDBC/parse error and fix that first.","Reconnect or re-log in to the Kettle repository; verify the repository database is reachable.","Check repository table integrity (R_ELEMENT_TYPE / R_NAMESPACE) for orphan rows; clean them via repository maintenance tools.","Ensure Pentaho/Kettle versions match between client and repository schema (run repository upgrade if needed)."],"exampleFix":"// before\nList<IMetaStoreElementType> types = metastore.getElementTypes(namespace); // throws\n\n// after\ntry {\n  List<IMetaStoreElementType> types = metastore.getElementTypes(namespace);\n} catch (MetaStoreException e) {\n  log.error(\"List failed: \" + e.getCause(), e); // fix underlying JDBC/parse issue\n}","handlingStrategy":"try-catch","validationCode":"// verify repository connectivity first\nrepository.isConnected();","typeGuard":null,"tryCatchPattern":"try {\n  return metastore.getElementTypes(namespace);\n} catch (MetaStoreException e) {\n  throw new RuntimeException(\"Repository listing failed: \" + e.getCause(), e);\n}","preventionTips":["Log getCause() to expose the real JDBC error","Keep client and repository schema versions in sync","Monitor repository DB connectivity before metastore operations"],"tags":["metastore","repository","database","listing"],"backgroundTag":"database-query-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}