Closed dietzsch closed 4 months ago
Thank you @dietzsch for the heads up!
If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it and, ideally, providing a minimal yet complete sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.
FTR: Upgrading https://github.com/spring-projects/spring-data-examples/blob/main/jpa/envers/pom.xml to Hibernate 6.4.1 should also reproduce the failure.
Hi @mp911de I used the code from the docs and created a minimal project where you can see the error when running the test. Repo: https://github.com/dietzsch/issue-3381
PS: I used the current Spring Boot 3.2.3 version with Hibernate 6.4.4.Final
org.hibernate.metamodel.model.domain.internal.EntityTypeImpl
does not jakarta.persistence.metamodel.MappedSuperclassType
. This is a Hibernate issue that I can reproduce with the plain Hibernate reproducer testcase by just adding Hibernate envers.
See https://gist.github.com/mp911de/1d5231ab2fb64356b35130f3f41fdf8b
Was this issue reported to Hibernate? If so it would be good to link it here, as this issue is first that shows up in search results.
@krzyk there is open issue on hibernate: https://hibernate.atlassian.net/browse/HHH-17612
Hello,
we recently updated from Spring Boot 3.1.x to 3.2.x. In parallel we are using @Audited and have a dependency:
org.hibernate.orm:hibernate-envers
After the update to the new Spring Boot version we see the following error at startup of the application:
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
which seems to be related to the envers dependency. There is also already a thread on Stackoverflow that is discussing this issue:
https://stackoverflow.com/questions/77753483/hibernate-envers-6-4-1-illegal-argument-on-static-metamodel-field-injection
Alex