4 Replies Latest reply on Jun 30, 2004 4:12 PM by nooreini

    Classloader question

    chrissirwin

      Hi,

      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: Classloader question
          geveritt

          In your jboss-service.xml on the classpath element
          add an archive attribute... for example

          <server>
          <classpath codebase="deploy" archives="MyStuff.jar,EvenMoreStuff.jar" />
          
           <mbean name="XXXXX:name=MyService"
          ....
          ....
          ....
          </server>


          • 2. Re: Classloader question
            nooreini

             

            "geveritt" wrote:
            In your jboss-service.xml on the classpath element
            add an archive attribute... for example
            <server>
            <classpath codebase="deploy" archives="MyStuff.jar,EvenMoreStuff.jar" />
            
             <mbean name="XXXXX:name=MyService"
            ....
            ....
            ....
            </server>


            • 3. Re: Classloader question
              nooreini

              I am having similar problem and I followed this solution but there is luck. Any further suggestions will be appreciated.

              Thanks is advance....

              • 4. Re: Classloader question
                nooreini

                 

                "nooreini" wrote:
                I am having similar problem and I followed this solution but there is NO luck. Any further suggestions will be appreciated.

                Thanks is advance....