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:


      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


            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:


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



            • 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.


              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!