pentaho/pentaho-kettle · error · MetaStoreException
Unable to get element type with name
Error message
Unable to get element type with name '<elementTypeName>' in namespace '<namespace>'
What it means
Thrown by getElementTypeByName when an exception (not a simple miss) occurs while resolving an element type by name in a namespace. The lookup flow verifies the namespace, finds the type id by name, and parses the row; any failure in those delegate calls is wrapped in MetaStoreException. A name that simply does not exist returns null instead of throwing.
Solutions
- Check e.getCause() for the underlying JDBC failure and restore the repository connection.
- Distinguish miss-vs-failure: a null return means not found; only exceptions trigger this error — retry after connectivity is restored.
- Verify namespace exists via getNamespaceIds() before lookup to rule out namespace-level problems.
- Repair corrupted repository tables with Pentaho repository maintenance/upgrade tooling.
Example fix
// before
IMetaStoreElementType t = metastore.getElementTypeByName(namespace, typeName); // may throw
// after
try {
IMetaStoreElementType t = metastore.getElementTypeByName(namespace, typeName);
} catch (MetaStoreException e) {
throw new RuntimeException("Repository failure resolving '" + typeName + "': " + e.getCause(), e);
} Defensive patterns
Strategy: try-catch
Validate before calling
if (!metastore.getNamespaceIds().contains(namespace)) {
return null; // namespace absent -> type can't exist
} Try / catch
try {
return metastore.getElementTypeByName(namespace, name);
} catch (MetaStoreException e) {
log.error("Repository failure resolving '{}': {}", name, e.getCause(), e);
return null;
} Prevention
- Treat null as not-found; exceptions as repository failures
- Check namespace existence before type lookups
- Repair corrupted repository tables promptly
When it happens
Trigger: Calling getElementTypeByName(namespace, elementTypeName) where the namespace verification, id-by-name query, or delegate.parseElementType throws — e.g. repository connectivity failure or corrupted rows for that namespace.
Common situations: Repository database outage or dropped connection while resolving types; orphaned/corrupt R_ELEMENT_TYPE rows after an interrupted migration; passing null name into the lookup against a flaky repository.
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
- Unable to create new element with name 'elementName'
- Unable to get element by name
- Unable to get element type with id
- Unable to get list of element types for namespace
- Unable to save element type in the database repository
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/797c012510f513f0.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/metastore/KettleDatabaseRepositoryMetaStore.java:233
}
}
@Override
public IMetaStoreElementType getElementTypeByName( String namespace, String elementTypeName ) throws MetaStoreException {
try {
LongObjectId namespaceId = delegate.getNamespaceId( namespace );
if ( namespaceId == null ) {
return null;
}
LongObjectId elementTypeId = delegate.getElementTypeId( namespaceId, elementTypeName );
if ( elementTypeId == null ) {
return null;
}
RowMetaAndData elementTypeRow = delegate.getElementType( elementTypeId );
return delegate.parseElementType( namespace, namespaceId, elementTypeRow );
} catch ( Exception e ) {
throw new MetaStoreException( "Unable to get element type with name '"
+ elementTypeName + "' in namespace '" + namespace + "'", e );
}
}
@Override
public void updateElementType( String namespace, IMetaStoreElementType elementType ) throws MetaStoreException {
try {
ObjectId namespaceId = delegate.verifyNamespace( namespace );
String elementTypeId = elementType.getId();
if ( elementTypeId == null ) {
IMetaStoreElementType type = getElementTypeByName( namespace, elementType.getName() );
if ( type != null ) {
elementTypeId = type.getId();
}
}
if ( elementTypeId != null ) {
delegate.updateElementType(View on GitHub (pinned to f3058517a1)