2 Replies Latest reply on Jul 13, 2003 10:32 AM by Eric Hansen

    class loading: NoClassDefFoundError

    Eric Hansen Newbie

      In a nutshell, it appears that JBoss/Jetty is not loading classes inside my .war application...

      It only does this, however, if I first load an mbean (via a -service.xml file) that uses a class (from a jar file in the ..server/default/lib). This mbean is dependent on a couple of other mbeans that create JMS queues. All of this deploys without any errors, and my custom mbean class works just fine.

      So... after all the JBoss and my custom mbeans have been deployed, I can, for example, drop the .war file into the deploy folder... it begins to load my StartupServlet.class (which buried in a package located in WEB-INF/classes) and then fails (NoClassDefFoundError) when it tries to instantiate a class that is also in the WEB-INF/classes/ path but in a different package. It also chokes when it needs a class in the WEB-INF/lib folder. It seems odd that the StartupServlet.class file is actually running (ie loaded by the classloader?) while other classes inside the .war file cannot.

      Now if I do not deploy my mbean that creates the JMS queues etc (delete the -service file from the deploy folder) then the .war application loads and runs without error.

      I am using JBoss 3.2.1 with Jetty on Win2k
      Any ideas???
      Thanks for any help!!!
      -Eric