pentaho/pentaho-kettle · error · MetaStoreException

The element type with name

Error message

The element type with name '${elementType.name} doesn't exist in namespace '${namespace}'.
Available nodes:
${available}

What it means

validateElementTypeRepositoryFolder resolves the repository folder for an element type by its id. If pur.getFileById(elementType.getId()) is null, the type's folder is gone, so the error is thrown and — to aid debugging — the message lists the available folders under the namespaces tree. This indicates the element type object references a folder that no longer exists in the repository.

Solutions

  1. Re-fetch the element type via getElementTypeByName(namespace, name) to get a fresh object with a valid id.
  2. List available types with getElementTypes(namespace) and confirm the type still exists.
  3. Recreate the element type if it was deleted, then re-associate elements.
  4. Avoid caching IMetaStoreElementType objects across long-running sessions or repository modifications.

Example fix

// before
metaStore.validateElementTypeRepositoryFolder(namespace, cachedType); // stale id
// after
IMetaStoreElementType fresh = metaStore.getElementTypeByName(namespace, cachedType.getName());
metaStore.validateElementTypeRepositoryFolder(namespace, fresh);
Defensive patterns

Strategy: validation

Validate before calling

IMetaStoreElementType fresh = metaStore.getElementTypeByName(namespace, type.getName());
if (fresh == null) throw new IllegalStateException("Type missing in namespace " + namespace);

Try / catch

try { useElementType(type); }
catch (MetaStoreException e) { /* re-list getElementTypes(namespace) and recover */ }

Prevention

When it happens

Trigger: Calling an operation that resolves an element type's folder (via elementTypeFolder/typeFolder/folder) when the type was deleted or its repository folder was removed/renamed out-of-band, so the cached elementType.getId() no longer resolves.

Common situations: Holding a stale IMetaStoreElementType across repository changes; another client deleted the type; manually manipulating repository folders via Pentaho User Console; using an element type from a backup or different repository.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


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

Appendix: source

Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/metastore/PurRepositoryMetaStore.java:508

  protected RepositoryFile validateNamespace( String namespace ) throws MetaStoreException {
    RepositoryFile namespaceFile = getNamespaceRepositoryFile( namespace );
    if ( namespaceFile == null ) {
      throw new MetaStoreException( "Namespace '" + namespace + " doesn't exist in the repository" );
    }
    return namespaceFile;
  }

  protected RepositoryFile validateElementTypeRepositoryFolder( String namespace, IMetaStoreElementType elementType )
    throws MetaStoreException {
    // The element type needs to be known in this repository, we need to have a match by ID
    //
    RepositoryFile elementTypeFolder = pur.getFileById( elementType.getId() );
    if ( elementTypeFolder == null ) {
      StringBuilder builder = new StringBuilder();
      builder.append( namespacesFolder.getPath() ).append( Const.CR );
      String available = getMetaStoreFolders( builder, namespacesFolder, 0 );
      throw new MetaStoreException( "The element type with name '" + elementType.getName()
          + " doesn't exist in namespace '" + namespace + "'." + Const.CR + "Available nodes:" + Const.CR + available );
    }
    return elementTypeFolder;
  }

  private String getMetaStoreFolders( StringBuilder builder, RepositoryFile folder, int level ) {
    String spaces = Const.rightPad( " ", level * 2 );
    builder.append( spaces );
    if ( folder.isFolder() ) {
      builder.append( "/" );
    }
    builder.append( folder.getName() ).append( Const.CR );
    for ( RepositoryFile file : getChildren( folder.getId() ) ) {
      getMetaStoreFolders( builder, file, level + 1 );
    }
    return builder.toString();
  }

View on GitHub (pinned to f3058517a1)