pentaho/pentaho-kettle · error · MetaStoreException
Namespace ' doesn't exist in the repository
Error message
Namespace '${namespace} doesn't exist in the repository What it means
validateNamespace resolves the folder file representing the given namespace in the PUR repository. When getNamespaceRepositoryFile(namespace) returns null, the namespace does not exist as a folder in the repository, and a MetaStoreException is thrown. It is used by namespaceFile/namespaceRepositoryFile to fail fast on operations targeting an unknown namespace.
Solutions
- Call metaStore.createNamespace(namespace) before performing operations on a namespace that may not exist.
- Verify the name with metaStore.getNamespaces() / namespaceExists(namespace) before use.
- Check spelling and case of the namespace string.
- Confirm you are connected to the repository that actually contains the namespace.
Example fix
// before
metaStore.validateNamespace(namespace); // throws if missing
// after
if (!metaStore.getNamespaces().stream().anyMatch(n -> n.getName().equals(namespace))) {
metaStore.createNamespace(namespace);
} Defensive patterns
Strategy: validation
Validate before calling
boolean exists = metaStore.getNamespaces().stream() .anyMatch(n -> n.getName().equals(namespace)); if (!exists) metaStore.createNamespace(namespace);
Try / catch
try { validateNamespace(namespace); }
catch (MetaStoreException e) { metaStore.createNamespace(namespace); } Prevention
- Create namespaces explicitly before use
- Validate namespace spelling/case against getNamespaces()
When it happens
Trigger: Calling operations like validateNamespace (via namespaceFile / namespaceRepositoryFile) with a namespace string whose folder does not exist under /etc/metastore in the repository — e.g., a typo, an un-created namespace, or a namespace from a different repository.
Common situations: Typo or case mismatch in the namespace name; assuming namespaces are auto-created when they must be created explicitly via createNamespace; pointing code at a fresh/empty repository that never had the namespace created.
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
- folder is not available
- The element to update with id
- The element type ' ' could not be found in the meta store…
- Unable to find namespace with name 'namespace'
- AbsSecurityProvider.ERROR_0002_UNABLE_TO_ACCESS_IS_ALLOWED
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/6cb28fa5a307b831.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/metastore/PurRepositoryMetaStore.java:494
// Backwards Compatibility
if ( dataProperty.getName().equals( dataNode.getName() ) ) {
attribute.setValue( value );
}
attribute.addChild( newAttribute( dataProperty.getName(), value ) );
}
for ( DataNode subNode : dataNode.getNodes() ) {
IMetaStoreAttribute subAttr = newAttribute( subNode.getName(), null );
dataNodeToAttribute( subNode, subAttr );
attribute.addChild( subAttr );
}
}
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;
}View on GitHub (pinned to f3058517a1)