15 years later I have the same problem with my Entity-Model when migrating from Hibernate 5 to 6. Everthing works fine with WildFly 26 and Hibernate 5. Changing to WildFly 35 with Jakarta EE 10 and Hiberenate 6 results in this error.
So the question is: what's the reason for this error in Hibernate 6 and where to find relevant documentation?