Hey everyone,
we are using hibernate envers version 6.4.1.Final.
We setup a table “revinfo” and the respective _aud tables for all auditable entities. The auditing is behaving as should.
On the startup of the service, we are receiving an exception:
HHH015007: Illegal argument on static metamodel field injection : org.hibernate.envers.DefaultRevisionEntity_#class_; expected type : org.hibernate.metamodel.model.domain.internal.EntityTypeImpl; encountered type : jakarta.persistence.metamodel.MappedSuperclassType
Now, I digged a bit deeper into the MetaDataContext to get the following error message:
java.lang.IllegalArgumentException: Can not set static jakarta.persistence.metamodel.MappedSuperclassType field org.hibernate.envers.DefaultRevisionEntity_.class_ to org.hibernate.metamodel.model.domain.internal.EntityTypeImpl
We do not have a custom implementation of the DefaultRevisionEntity. When i add one, the error messages above are gone.
Now I wondered, why this exception is triggered and if this is a desired behavior.
Thanks, already for the response!