4 Replies Latest reply on Jun 23, 2006 7:13 AM by timfox

    ClassLoader issue on client

      I'm trying to post messages to a queue from an MBean service.

      When I call the send method I get the following exception:


      java.lang.RuntimeException: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.jms.server.container.SecurityAspect
      at org.jboss.aop.advice.GenericAspectFactory.getClazz(GenericAspectFactory.java:141)


      I've tried adding
       <loader-repository>cris3:loader=ScopedLoaderRepository
       <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
       </loader-repository>
      


      To my *****-server.xml file , But it doesn't make any difference

      I'm using JBoss AS 4.0.4 and messaging 1.0.1CR2

      Thanks

        • 1. Re: ClassLoader issue on client
          timfox

          Did you change the name of the messaging loader repository to "cris3"?

          The default one is:

          <loader-repository>jboss.messaging:loader=ScopedLoaderRepository
           <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
           </loader-repository>
          
          


          • 2. Re: ClassLoader issue on client

            Sorry , I tried that first and got a different exception (but I didn't look closely enough at it - it was a simple security config issue) so I started reading and found some documentation that gave me the idea that maybe the part before loader should be the domain name of my MBean.

            Thanks for the quick response.

            • 3. Re: ClassLoader issue on client
              smievoll

              Just a side-note; rather than having to share classloaders, which isn't always the easiest thing to do in a complex deployment, do you have a pending issue on cleaning up the jboss-messaging-client.jar? It's a bit bloated at the moment. And do you plan to better integrate Messaging in the 4.0 series in the near future (i.e. skip the isloation)?

              • 4. Re: ClassLoader issue on client
                timfox

                The isolation is required for 4.x, since we depend on versions of JBoss AOP, JBoss Remoting, JBoss Serialization that aren't available in 4.x

                When JBoss 5 is released we will be using the same versions as in the AS so the deployment should be much smaller and we won't have to do scoped deployments which frankly are a pain in the arse, but there's no real way to avoid them for 4.x