11 Replies Latest reply: Feb 2, 2012 3:14 AM by guinotphil RSS

    Classloader leak in BeanMetaDataCache?

    Harald Wellmann Novice

      I'm currently experimenting with JBoss AS 7, using a real-world Java EE 6 application 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.

       

      Could it be that the BeanMetaDataCache does not get cleared when an application is undeployed, so that the server core keeps holding stale references to application classloaders?

       

      Best regards,

      Harald