pentaho/pentaho-kettle · error · MetaStoreException
The element type ' ' could not be found in the meta store…
Error message
The element type '${elementTypeName}' could not be found in the meta store in which you are updating. What it means
updateElement verifies that the elementType object being used belongs to this meta store (its name matches the store's name and its metaStoreName is set). If it does not, the code re-resolves the element type by name within the namespace via getElementTypeByName; when that lookup returns null, it means no element type with that name exists in the target meta store, so the update is rejected. This guards against updating elements with a detached or foreign IMetaStoreElementType.
Solutions
- Look up a fresh IMetaStoreElementType via metaStore.getElementTypeByName(namespace, typeName) and pass that to updateElement instead of the stale/foreign type object.
- Verify the element type still exists in the namespace before updating (getElementTypeByName != null).
- Ensure you are using the same meta store instance the element type was created in; align store names.
- Recreate or re-import the element type if it was accidentally deleted.
Example fix
// before metaStore.updateElement(namespace, staleElementType, elementId, element); // after IMetaStoreElementType type = metaStore.getElementTypeByName(namespace, staleElementType.getName()); metaStore.updateElement(namespace, type, elementId, element);
Defensive patterns
Strategy: validation
Validate before calling
IMetaStoreElementType t = metaStore.getElementTypeByName(namespace, elementType.getName());
if (t == null) { throw new IllegalStateException("Element type not in this meta store: " + elementType.getName()); } Try / catch
try { metaStore.updateElement(namespace, elementType, id, el); }
catch (MetaStoreException e) { /* refresh type by name and retry once */ } Prevention
- Always resolve element types via getElementTypeByName on the same store instance
- Never cache IMetaStoreElementType objects across store lifecycles
When it happens
Trigger: Calling PurRepositoryMetaStore.updateElement(namespace, elementType, elementId, element) where elementType.getName() does not match the store's name or elementType.getMetaStoreName() is null, and no element type with that name exists in the given namespace.
Common situations: Using an IMetaStoreElementType obtained from a different meta store instance or a stale in-memory reference after the type was deleted or renamed; passing a locally constructed IMetaStoreElementType whose name doesn't exist in the repository namespace.
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
- Namespace ' doesn't exist in the repository
- The element to update with id
- AbsSecurityProvider.ERROR_0002_UNABLE_TO_ACCESS_IS_ALLOWED
- AddSequenceMeta.Exception.UnableToReadStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/f1ef45de0382e244.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/metastore/PurRepositoryMetaStore.java:334
DataProperty nameProperty = dataNode.getProperty( PROP_NAME );
if ( nameProperty != null ) {
element.setName( nameProperty.getString() );
}
DataNode childrenNode = dataNode.getNode( PROP_ELEMENT_CHILDREN );
dataNodeToAttribute( childrenNode, element );
}
@Override
public synchronized void updateElement( String namespace, IMetaStoreElementType elementType, String elementId,
IMetaStoreElement element ) throws MetaStoreException {
// verify that the element type belongs to this meta store
//
if ( elementType.getMetaStoreName() == null || !elementType.getName().equals( getName() ) ) {
String elementTypeName = elementType.getName();
elementType = getElementTypeByName( namespace, elementTypeName );
if ( elementType == null ) {
throw new MetaStoreException( "The element type '" + elementTypeName
+ "' could not be found in the meta store in which you are updating." );
}
}
RepositoryFile existingFile = pur.getFileById( elementId );
if ( existingFile == null ) {
throw new MetaStoreException( "The element to update with id " + elementId + " could not be found in the store" );
}
DataNode elementDataNode = new DataNode( PurRepository.checkAndSanitize( element.getName() ) );
elementToDataNode( element, elementDataNode );
RepositoryFile updatedFile = pur.updateFile( existingFile, new NodeRepositoryFileData( elementDataNode ), null );
element.setId( updatedFile.getId().toString() );
}
@Override
public IMetaStoreElement getElement( String namespace, IMetaStoreElementType elementType, String elementId )View on GitHub (pinned to f3058517a1)