Hi,
The JIRA issue is : HHH-2481 ("Big memory leak in the use of CGLIB")
Here is the link :
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2481
My J2EE context : I'm running a webapp under JBoss AS 4.0.2 with hibernate 3.2.3 and cglib 3.2.1.
My problem: When I deploy/undeploy the webapp about 3 times the following message occurs in JBoss console : "Perm Gen OutOfMemoryError " and then the whole Application Server is freezed.
I've profiled my webapp with Jprofiler and JConsole. What i can tell is that when I deploy and use the webapp the Perm Gen stack grows but is never garbage collected. I repeat the deployement/use/undeployement process for about 3 times and the perm gen stack still grows till it overflows.
There's a strange thing that I've noticed with JProfiler : when I undeploy this webapp I still got few hibernate classes references that are not cleared. And the next deployement comes with its own hibernates classes references. I looks like some Hibernate classes are link with JBoss ThreadLocal and are not garbage collected till JBoss dies.
So the issue HHH-2481 seems to describe my problem and was supposed to be fixed in the release 3.2.3.
Do you have an idea ?
Thanks a lot for your help.
Best Regards.