For information, here is a hint to circumvent this error in Payara (6.2023.1) / GlassFish (7.0.4): just add explicitly the following properties in the persistence.xml of the application:
<property name="hibernate.enhancer.enableDirtyTracking" value="false"/>
<property name="hibernate.enhancer.enableLazyInitialization" value="false"/>
Note: we do bytecode enhancement during the build through a maven plugin. |