2 Replies Latest reply on Mar 31, 2004 3:36 PM by Glenn Everitt

    MBean Class loader problem

    chrissirwin Newbie

      I am trying to deploy an MBean that uses classes from another jar file that I have built. How can I make the MBena class loader aware of this jar file? I have tried placing the jar file in the server/default/lib and server/default/deploy directories, but to no avail. When i step through the class with a debugger, the class loader only contains the 2 classes that are in the sar file. Do I need to add the jar file to the sar file? If so, then how do I go about doing that? I don't see any examples of this and can't find anything on this discussion group.

      I am using:
      Windows XP
      Jboss 3.2.3
      java version "1.4.2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
      Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)


      Thanks,

      Chris

        • 1. Re: MBean Class loader problem
          Glenn Everitt Newbie

          You need to change your jboss-service.xml file. Add an archives attribute to the classpath element. For example..

          <server>
          <classpath codebase="deploy" archives="MyStuff.jar,EvenMoreStuff.jar" />
          
          <mbean name="XXXX:name=MyService"
           code="com.xxx.MyServiceThing"
           xmbean-dd="META-INF/MyService-xmbean.xml"
           >
          ...
          ...
          ...
          </server>
          


          • 2. Re: MBean Class loader problem
            Glenn Everitt Newbie

            You need to change your jboss-service.xml file. Add an archives attribute to the classpath element. For example

            <server>
            <classpath codebase="deploy" archives="MyStuff.jar,EvenMoreStuff.jar" />
            
            <mbean name="XXXX:name=MyService"
             code="com.xxx.MyServiceThing"
             xmbean-dd="META-INF/MyService-xmbean.xml"
             >
            ...
            ...
            ...
            </server>