| I just want to mention that after migrating our appserver from Wildfly 13 to 18 (with Hibernate 5.3.12) I see exactly the same issue. I have a more complex model but actually the same happens. We have enable_lazy_load_no_trans enabled. While creating a proxy the ByteBuddyInterceptor sets the session. But the instance is not initialized! Then the temporary session is closed. In a later call the same object is initialized (ByteBuddyInterceptor(AbstractLazyInitializer).getImplementation() … initialize() and this proxy is still assigned to the closed session. This only happens if the entity(proxy) was created already somewhere else as a lazy reference. But in this call I do not initialize this proxy. |