3 Replies Latest reply on May 17, 2006 5:04 PM by Dogort Tucky

    JBoss_4_0_4_GA and HttpServlet NoClassDefFoundError

    Dogort Tucky Newbie


      i created the simplest servlet that you could imagine. it returns "ok" and is placed within a WAR file. by deploying it on my JBoss 4.0.4 GA i get a NoClassDefFoundError.

      my installation is fresh installed by the wizard, by clicking on the option "EJB 3" support. everything else is standard.

      if you want to verify, please download the very small WAR (click shift to safe):

      the servlet has been compiled with JDK 1.5 update 6. please also refer to the source of the servlet:

      finally i also uploaded the jboss-server log:

      can anybody reproduce that? or give me any hint?

      patrick heusser

      patrick heusser

        • 1. Re: JBoss_4_0_4_GA and HttpServlet NoClassDefFoundError
          Catherine Ying Newbie

          Which class is missing?

          I got the following exception when trying to test my web service client.

          [java] Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xerces/xs/XSModel
          [java] at org.jboss.ws.metadata.JSR109ClientMetaDataBuilder.buildMetaDa
          [java] at org.jboss.ws.metadata.JSR109ClientMetaDataBuilder.buildMetaDa
          [java] at org.jboss.ws.jaxrpc.ServiceImpl.(ServiceImpl.java:96)
          [java] at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
          [java] at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
          [java] at com.vormetric.webservice.wsclient.WSClient.main(WSClient.java:32)

          If you got the same error about a class in the same package, you can copy $JBOSS_HOME/lib/endorsed/xercesImpl.jar into $JBOSS_HOME/client directory, bounce JBoss server, and re-test.

          • 2. Re: JBoss_4_0_4_GA and HttpServlet NoClassDefFoundError
            Dogort Tucky Newbie


            the class which is not found is: HttpServlet which is definitly in the distribution contained in the file /server/lib/javax.servlet.jar

            i made some further investigations using a plaine tomcat 5.5.17 installation. i deployed the war and it runs without any problems.

            i ask myself: is there a problem with the jboss 4.0.4 GA release?


            • 3. Re: JBoss_4_0_4_GA and HttpServlet NoClassDefFoundError
              Dogort Tucky Newbie


              i resolved the problem: the WAR works fine with the ZIP distribution of the 4.0.4.GA. that the installer must be the problem...

              may be it's a feature, but for me it was not clear, that when installtion JBoss using the installer, it would not be possible to use servlets anymore...