-
Bug
-
Resolution: Done
-
Major
-
7.0.2.Final
I'm running a real-world Java EE 6 application on JBoss AS 7 which I've already tested on JBoss AS 6, GlassFish and Resin. The application uses JPA, EJB, CDI, JAXB, Servlet and JSP.
After redeploying the application a couple of times by simply touching the WAR in the standalone/deployments directory, I'm getting a PermGen OutOfMemoryError, which did not occur on the other servers.
Inspecting a heap dump with Eclipse Memory Analyzer, I can see a single instance of org.hibernate.validator.metadata.BeanMetaDataCache holding references to various classes from my own persistence unit, but these classes are loaded from different instances of org.jboss.modules.ModuleClassLoader, all with the same module identifier deployment.myapp.war.
It seems that the BeanMetaDataCache does not get cleared when an application is undeployed, so that the server core keeps holding stale references to application classloaders, thus causing the PermGen leak.