Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-2251

Classloader leak in BeanMetaDataCache

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Activity

          People

            smarlow1@redhat.com Scott Marlow
            hwellmann.de Harald Wellmann (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: