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

    JBoss_4_0_4_GA and HttpServlet NoClassDefFoundError

    wauwau0977

      hi

      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):
      http://www.x8ing.com/tmp/TestServlet.war

      the servlet has been compiled with JDK 1.5 update 6. please also refer to the source of the servlet:
      http://www.x8ing.com/tmp/TestServlet.java

      finally i also uploaded the jboss-server log:
      http://www.x8ing.com/tmp/TestServletLog.txt

      can anybody reproduce that? or give me any hint?

      regards,
      patrick heusser

      --
      patrick heusser
      http://www.x8ing.com/fractal/

        • 1. Re: JBoss_4_0_4_GA and HttpServlet NoClassDefFoundError
          yingbenben

          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
          ta(JSR109ClientMetaDataBuilder.java:102)
          [java] at org.jboss.ws.metadata.JSR109ClientMetaDataBuilder.buildMetaDa
          ta(JSR109ClientMetaDataBuilder.java:78)
          [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
            wauwau0977

            hi

            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?

            ./Patrick

            • 3. Re: JBoss_4_0_4_GA and HttpServlet NoClassDefFoundError
              wauwau0977

              hi

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

              regards,
              patrick