1 2 Previous Next 16 Replies Latest reply on Jan 12, 2010 8:51 AM by adrian.brock Go to original post
      • 15. Re: Doble ear Classloader problem

        This link https://jira.jboss.org/jira/browse/EJBTHREE-1442?focusedCommentId=12429076#action_12429076

        gives an example of using JDK6 tools to track down where a leaked reference is held.

         

        You need to do some analysis to weed out weak references and circular references, e.g.

        https://jira.jboss.org/jira/browse/JBAS-5270

        • 16. Re: Doble ear Classloader problem

          igor84 wrote:

           

          Sorry, I wasn't clear. Class org.jaxen.jdom.DocumentNavigator where exception occures is in <JBOSS_HOME>/common/lib/jaxen.jar and org.jdom.Document class is in <JBOSS_HOME>/server/default/deploy/epps.ear/lib/jdom.jar. So when redeploy is done org.jdom.Document is redeployed also.

          My **guess** is that jaxen is holding a reference to the Document class somewhere.

           

          e.g.

          $ jar -tf jaxen.jar | grep Document
          org/jaxen/dom/DocumentNavigator$1.class
          org/jaxen/dom/DocumentNavigator$2.class
          org/jaxen/dom/DocumentNavigator$3.class
          org/jaxen/dom/DocumentNavigator$4.class
          org/jaxen/dom/DocumentNavigator$5.class
          org/jaxen/dom/DocumentNavigator$6.class
          org/jaxen/dom/DocumentNavigator$AttributeIterator.class
          org/jaxen/dom/DocumentNavigator$NodeIterator.class
          org/jaxen/dom/DocumentNavigator.class
          org/jaxen/dom4j/DocumentNavigator$Singleton.class
          org/jaxen/dom4j/DocumentNavigator.class
          org/jaxen/function/xslt/DocumentFunction.class
          org/jaxen/javabean/DocumentNavigator.class
          org/jaxen/jdom/DocumentNavigator$Singleton.class
          org/jaxen/jdom/DocumentNavigator.class
          org/jaxen/xom/DocumentNavigator$1.class
          org/jaxen/xom/DocumentNavigator$2.class
          org/jaxen/xom/DocumentNavigator$IndexIterator.class
          org/jaxen/xom/DocumentNavigator$XPathNamespace.class
          org/jaxen/xom/DocumentNavigator.class
          
          

           

          If the above **guess** is correct. Then you should make sure that jaxen and jdom are in the same classloader (or at least redeployed together)

          to avoid ClassCastException on redeploys of one of them.

          1 2 Previous Next