users@glassfish.java.net

Classloader Leaking

From: <glassfish_at_javadesktop.org>
Date: Thu, 04 Feb 2010 08:47:11 PST

Hello everyone,

I have a memory leak in my application which has been very hard to fix. My application classes don't leave the memory after an undeploy. I don't even need to use the application, if I just deploy and instantly undeploy, almost all of the classes remain in memory. I used jhat and jmap to track them.

Form what I could understand, even the simplest EAR application which uses hibernate (and its dependencies) along with Stateless Session Beans, leaks memory, and you don't even need to use the application, just deploy and undeploy it to see that all the classes remain in memory.

Are there any adivces to have a perfeclty clean undeploy in my server, if my application uses EJB and Hibernate? I'm running out of permgen space all the time.

My current versions are:

Glassfish 2.1.1 (latest build)
JDK 1.6 u18

Thanks.
[Message sent by forum member 'mmilanez' (mmilanez_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=384822