Hello,
last week, we upgraded a legacy web application to hibernate-core 5.5.7.Final and were affected by an OOM error which manifests exactly as described in HHH-14694: when an entity manager factory is closed, its ByteBuddy-synthesized proxy classes with names like com.example.Account$HibernateProxy$T803qhHQ remain in memory and exhaust the metaspace after some time.
Trying out different things with the test case which is attached to that Jira issue, using Javassist instead of ByteBuddy (-Dhibernate.bytecode.provider=javassist) solves the problem for us, but as Javassist is deprecated, I would like to ask if there is any other known workaround or whether the bug will be fixed some time soon.
Thank you
Kambiz Darabi
m-creations gmbh
Acker 2
55116 Mainz
Germany