4 Replies Latest reply on Dec 9, 2003 1:13 PM by radgon

    java.lang.NoClassDefFoundError: org/jboss/naming/Util with J

    harlequinn Newbie

      Has anyone else seen this error? I don't get that one as long as I run the JBoss server nicely from command line, using the run-script.

      But when I install the JBOSS as a service on my win2000 machine, this appears in the server logfiles. Now I have located this particular class to be under the server lib directory, so to me it seems that when I run this as a service, it doesn't automatically note the lib directory contents.

      So... Any ideas on how to fix this? Currently when I register this as a service my classpath is:

      java.class.path=%Java_Home%\lib\tools.jar;%JBoss_Home%\bin\run.jar;%JBoss_Home%\bin\shutdown.jar;%JBOSS_HOME%\lib\concurrent.jar;%JBOSS_HOME%\lib\jboss-system.jar

      This seems to be enough .jars to start it up. I could easily add the path to server lib directory and jboss.jar file which contains the abovementioned class, but... somehow I don't feel this is right solution. Isn't the server supposed to use those jars automatically?

      Any ideas then? This doesn't stop me from using JBoss, but it sure irritates me to no end. It is followed by bunch of other error messages.

        • 1. Re: java.lang.NoClassDefFoundError: org/jboss/naming/Util wi
          harlequinn Newbie

          Addition: This happens with JBoss-3.2.1&Tomcat-4.1.24 combination, haven't really tried this with Jetty. It seems to be some kind of classpath issue (Since org/jboss/naming/Util is in jboss.jar, under the server lib directory, which should automatically be in).

          So it works when I run on command prompt, it gives the above error when I run it with JavaService using the information found from these forums. The server boots up in both cases, but in the latter case I get that error in the server out logs, and several other errors follow up. Just to try it out I did add the jboss.jar to classpath of javaservice, and this time server didn't even start, but started giving me odd error about missing classes in strange packages.

          Any ideas?

          • 2. Re: java.lang.NoClassDefFoundError: org/jboss/naming/Util wi
            radgon Newbie

            Hi harlequinn,

            I had a similar error while trying to get lomboz to run with jboss3.2.1 - drove me crazy till vashistvishal (THANKS!) posted the link to the tutorial

            http://www.tusc.com.au/news_events/news_details.php?id=34

            there you will find a file called jboss321all.server which has a section where the libraries for the "inside-calling" (which should be the same as calling java -jar run.jar - omitting the run.sh or .bat script) of jboss from eclipse are listed:


            JDK_TOOLS
            ${classPathVariableName}/bin/run.jar
            ${classPathVariableName}/bin/shutdown.jar
            ${classPathVariableName}/client/jboss-j2ee.jar
            ${classPathVariableName}/server/all/lib/javax.servlet.jar
            ${classPathVariableName}/lib/concurrent.jar
            ${classPathVariableName}/lib/gnu-regexp.jar
            ${classPathVariableName}/lib/jboss-system.jar
            ${classPathVariableName}/lib/commons-httpclient.jar
            ${classPathVariableName}/lib/getopt.jar
            ${classPathVariableName}/lib/jboss-boot.jar
            ${classPathVariableName}/lib/jboss-common.jar
            ${classPathVariableName}/lib/jboss-jmx.jar
            ${classPathVariableName}/lib/log4j-boot.jar
            ${classPathVariableName}/lib/jdom.jar
            ${classPathVariableName}/lib/webdavlib.jar
            ${classPathVariableName}/lib/xercesImpl.jar
            ${classPathVariableName}/lib/xml-apis.jar
            ${classPathVariableName}/server/all/lib/jboss.jar
            ${classPathVariableName}/server/all/lib/jsse.jar
            ${classPathVariableName}/server/all/lib/jboss-jaas.jar
            ${classPathVariableName}/server/all/lib/jboss-j2ee.jar
            ${classPathVariableName}/server/all/lib/jts.jar
            ${classPathVariableName}/server/all/lib/jsse.jar
            ${classPathVariableName}/server/all/lib/jboss-management.jar
            ${classPathVariableName}/server/all/lib/jbossmqha.jar
            ${classPathVariableName}/server/all/lib/jbossmq.jar
            ${classPathVariableName}/server/all/lib/jbosssx.jar
            ${classPathVariableName}/server/all/lib/jpl-pattern.jar
            ${classPathVariableName}/server/all/lib/jpl-util.jar
            ${classPathVariableName}/server/all/lib/jbossha.jar
            ${classPathVariableName}/server/all/lib/jnpserver.jar
            ${classPathVariableName}/server/all/lib/javagroups-2.0.jar
            ${classPathVariableName}/server/all/lib/jboss-transaction.jar
            ${classPathVariableName}/server/all/lib/bcel.jar
            ${classPathVariableName}/server/all/lib/jboss-jsr77.jar
            ${classPathVariableName}/server/all/lib/log4j.jar
            ${classPathVariableName}/server/all/lib/hsqldb.jar
            ${classPathVariableName}/server/all/lib/hsqldb-plugin.jar



            as you can see, there are much more than you included.
            Hopefully this will help,

            cu,

            Radgon

            • 3. Re: java.lang.NoClassDefFoundError: org/jboss/naming/Util wi
              Vishal Sharma Expert

              Have a look at this site and this might help you in yr learning curve.

              www.tusc.com.au/news_events/news_details.php?id=34

              Also just to mention that this site has more than 'jboss321all.server' file, I am sure you guys out there will love this.
              Check it out.

              • 4. Re: java.lang.NoClassDefFoundError: org/jboss/naming/Util wi
                radgon Newbie


                ...that's definitely true - there is much more to the tutorial than the mentioned file (but it helped a lot of people I assume). It's one of the best tutorials I have seen and what's very important: it's mostly using the up-to-date versions of all tools - just great and very detailed.

                Thanks a lot for this!