pentaho/pentaho-kettle · error · MetaStoreException
Unable to update element type
Error message
Unable to update element type
What it means
Generic wrapper thrown by updateElementType when a non-MetaStoreException occurs during the update transaction. The repository is rolled back before throwing, so a failed update leaves no partial changes. The cause carries the real failure (JDBC error, id conversion problem, commit failure, etc.).
Solutions
- Inspect e.getCause() for the JDBC/conversion error and address it (connection, schema, id validity).
- Confirm elementType.getId() is a valid ObjectId string before calling.
- Retry the update once connectivity is restored — rollback guarantees no partial state.
- Keep client and repository schema versions aligned (run repository upgrade).
Example fix
// before
metastore.updateElementType(namespace, elementType); // generic failure, silent rollback
// after
try {
metastore.updateElementType(namespace, elementType);
} catch (MetaStoreException e) {
log.error("Update rolled back: " + e.getCause(), e);
} Defensive patterns
Strategy: try-catch
Validate before calling
if (elementType.getId() == null) {
throw new IllegalArgumentException("elementType.id required for update");
} Try / catch
try {
metastore.updateElementType(namespace, elementType);
} catch (MetaStoreException e) {
log.error("Update rolled back: {}", e.getCause(), e);
// safe to retry after fixing cause
} Prevention
- Validate ObjectId strings before updates
- Ensure repository DB connectivity and matching schema versions
- Rely on rollback semantics — no partial updates occur
When it happens
Trigger: Calling updateElementType with a valid id but where delegate.updateElementType or repository.commit() throws — e.g. LongObjectId/StringObjectId conversion failure on a malformed id string, database connection loss, or SQL constraint violation.
Common situations: Repository database becomes unreachable mid-transaction; id string in external config was corrupted (not a valid ObjectId); schema mismatch after client/server version drift; concurrent modification locking issues.
Related errors
- Unable to create element with name
- Unable to delete element with id
- Unable to delete namespace ''+namespace+''
- Unable to update element with id
- Database.Exception.UnableToRollbackToSavepoint
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/08b310a7408b3a9b.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/metastore/KettleDatabaseRepositoryMetaStore.java:262
IMetaStoreElementType type = getElementTypeByName( namespace, elementType.getName() );
if ( type != null ) {
elementTypeId = type.getId();
}
}
if ( elementTypeId != null ) {
delegate.updateElementType(
namespaceId, new LongObjectId( new StringObjectId( elementType.getId() ) ), elementType );
repository.commit();
} else {
throw new MetaStoreException( "Unable to update element type: no id was provided and the name '"
+ elementType.getName() + "' didn't match" );
}
} catch ( MetaStoreException e ) {
throw e;
} catch ( Exception e ) {
repository.rollback();
throw new MetaStoreException( "Unable to update element type", e );
}
}
@Override
public void deleteElementType( String namespace, IMetaStoreElementType elementType ) throws MetaStoreException,
MetaStoreDependenciesExistsException {
try {
Collection<RowMetaAndData> elementTypeRows =
delegate.getElements( new LongObjectId( new StringObjectId( elementType.getId() ) ) );
if ( !elementTypeRows.isEmpty() ) {
List<String> dependencies = new ArrayList<String>();
for ( RowMetaAndData elementTypeRow : elementTypeRows ) {
Long elementTypeId =
elementTypeRow.getInteger( KettleDatabaseRepository.FIELD_ELEMENT_TYPE_ID_ELEMENT_TYPE );
dependencies.add( Long.toString( elementTypeId ) );
}
throw new MetaStoreDependenciesExistsException( dependencies, "The namespace to delete, '"
+ namespace + "' is not empty" );View on GitHub (pinned to f3058517a1)