5 Replies Latest reply on Jun 23, 2002 7:26 AM by andhess

    MLet classloader and classpath

    dschalle

      Hello,

      why does the classloader responsible for the MLets does not check the classpath given bei the vm option -classpath?

      However, this is nescessary for debugging!

      Thanks

      Daniel

        • 1. Re: MLet classloader and classpath

          I'm not sure I understand the question.

          The MLet class is a URLClassLoader.

          It will use the system classloader (classpath)
          But if the class is not found, it will load from the
          url/archive specified.

          Perhaps you can explain your problem in more detail?

          Regards,
          Adrian

          • 2. Re: MLet classloader and classpath
            dschalle

            Well, I have written a service for JBoss in form of a MBean.
            If I want to debug it, I have to start JBoss in debug-mode. The code, wich should be debuged, here the MBean code, must be accessable by the debugger (here Eclipse). So I have to put the directory, where the code is, to the classpath of JBoss. However, if JBoss starts,

            java.lang.NoClassDefFoundError:
            org/jboss/util/ServiceMBeanSupport

            occurs. If I put the code in form of a jar-file in the lib/ext directory of JBoss and remove the directory containing the unzipped code from the classpath, the error does not appear and the service is started fine. However, the debugging is not possible know.

            I hope, you know, what I mean and I hope you can give me an answer.

            Thanks

            Daniel

            • 3. Re: MLet classloader and classpath

              The class you report is in jboss.jar in lib/ext
              this is loaded by the JBoss classloader.

              If you add something to the System classpath, it
              cannot see anything in the JBoss classloader.

              I don't know anything about Eclipse. I would be surprised
              if a debugger only lets you debug code on the classpath.

              Regards,
              Adrian

              • 4. Re: MLet classloader and classpath
                dschalle

                Hello,

                I have done a ClassPathExtension in jboss.conf and it works everthing fine.

                Thank you

                Daniel

                • 5. Re: MLet classloader and classpath
                  andhess

                  Hello,

                  I'm having a similar problem in JBoss 3.0, but there is
                  no jboss.conf to extend the classpath. How can you do this
                  in JBoss 3.0????

                  Thanks
                  Andreas