0 Replies Latest reply on Apr 1, 2005 4:18 AM by Callista Chuah

    NoClasDefFoundError in servlet deployed by war

    Callista Chuah Newbie

      hi,

      Could someone tell me where I'm suppose to place my jar files in JBoss? Or is there a place to set classpath? Not familiar with using .war files.

      The war file structure:

      META-INF/
      META-INF/MANIFEST.MF
      META-INF/context.xml
      WEB-INF/
      WEB-INF/classes/
      WEB-INF/classes/mobster/
      WEB-INF/classes/mobster/MyServlet.class
      WEB-INF/lib/
      WEB-INF/lib/MyLib.jar
      WEB-INF/web.xml
      index.jsp
      xercesImpl.jar
      xmlParserAPIs.jar


      Libraries xercesImpl.jar and xmlParserAPI.jar are dependencies for MyLib.jar. MyLib.jar is used by MyServlet.


      I have added the following to JBOSS_HOME\server\default\deploy\jbossweb-tomcat50.sar\server.xml.
      <Context path="/go" docBase="c:/project/dist/MyApp.war" debug="1" reloadable="true" crossContext="true">
      </Context>


      Called JBoss using run.bat. The servlet loads and runs but throws a NoClassDefFoundError when it gets to a line referring to a class in MyLib.jar which refers to a class in xercesImpl.jar or xmlParserAPIs.jar.

      What did I miss?