3 Replies Latest reply on Dec 14, 2004 2:26 PM by davidakoontz

    JBoss 3.2.3 ClassLoading Help (yet again)

      I've read quite a bit about JBoss and ClassLoading (UCL) issues. As I am having one of these issue - but no luck resolving it, I'm looking for help.

      In general I can't find good info on the jboss-app.xml file and it's configuration. On the net there are many different examples that have various syntax.

      All my JBoss 3.2.3 manual has is an example (page 72) and very little explation:


      The name must be unique but is "not important".

      I've created this config file in my EAR but it has not had any effect on the app - it still appears to find the "wrong" class for my app. I've redeployed and re-started JBoss - but no effect.

      I'm using this:

      I've also see examples that use this:

      What does this turn off - how does that effect the class loading for my EAR? Why don't I find a reference to this in the manuals?

      My code is calling an Axis class org.apache.axis.client.Stub but getting a NoSuchMethodError when doing so.
      I've found that the method that I'm calling and failing on is loaded twice by Jboss:
      ### Instance0 found in UCL: org.jboss.mx.loading.UnifiedClassLoader3@4d5575{ url=file:/E:/apps/local/devl/software_common/jboss-3.2.3/server/cluster/deploy/jboss-net.sar/ ,addedOrder=5}
      ### Instance1 found in UCL: org.jboss.mx.loading.UnifiedClassLoader3@145c108{ url=file:/E:/apps/local/devl/software_common/jboss-3.2.3/server/cluster/tmp/deploy/tmp19997ReportNetGatewayEAR.ear ,addedOrder=48}

      What do I have to do to get JBoss to isolate my EAR's jars from the container's jars?


        • 1. Re: JBoss 3.2.3 ClassLoading Help (yet again)


          "davidakoontz" wrote:

          I've also see examples that use this:

          What does this turn off - how does that effect the class loading for my EAR? Why don't I find a reference to this in the manuals?

          It controls the order between parent and child repositories:

          Support for specifying custom loader repositories has been extended to SARs, EJB jars and WARs in addition to EARs. In addition the loader repository configuration allows for child first class loading rather than the parent delegation model. This allows deployments to override classes from the server level. To enable deployment first class loading use a configuration fragment like:


          in the jboss-app.xml, jboss.xml, jboss-web.xml or jboss-service.xml descriptor. See the corresponding descriptor DTD in the docs/dtd directory for more details.

          You should also try the deployment with the latest 3.2.x bug fix release, the older versions did have known issues with some XML classes "leaking" to isolated deployments.

          • 2. Re: JBoss 3.2.3 ClassLoading Help (yet again)

            Juha, thanks for your reply.

            I've just read the comments in the DTDs - and I'm still just as confused about how I need to configure JBoss as before.

            However I now see that the class loading may be in multiple configuration files (so it appears much more complex than before).

            This leads me to the question is the configuration of class loading independent, hierarchical, or something else with repect to deployed components? That is to say... if a EAR contains multiple EJB jars do I need to configure each EJB jar for class loading or just the EAR?

            • 3. Re: JBoss 3.2.3 ClassLoading Help (yet again)

              What I've found out is that I had a typo in the jboss-app.xml file. The typo was
              load-respository (note the extra 's' in repository). JBoss just quietly ignored the config file. I suppose it does not do XML validations.

              I also learned (the hard way) that if JBoss had given my EAR a seperate class loader it would appear as a seperate entry on the JMX-console page. I didn't know this so the fact that when it ignored my config file and didn't create an entry for the class loader on the console - would have tipped me off if I were a JBoss guru. Sucks to be me.... learning the hard way.