Closed felixdo closed 7 months ago
Same problem in Spring Boot 3.2.4 with Hibernate (+Envers) 6.4.4 Final:
2024-03-28 12:27:39.431 ERROR 75864 --- [ main] o.h.metamodel.internal.MetadataContext : 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
This is a Hibernate problem, see https://github.com/spring-projects/spring-data-jpa/issues/3381.
I got the same error when migrating my app from spring-boot 3.1.5 to 3.2.0 and found this example. The error is logged here too:
2024-01-03T19:09:17.359+01:00 ERROR 1451 --- [ main] o.h.metamodel.internal.MetadataContext : 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
See also my SO question: https://stackoverflow.com/questions/77753483/hibernate-envers-6-4-1-illegal-argument-on-static-metamodel-field-injection