1 Reply Latest reply on May 18, 2002 8:09 PM by Julian Gosnell

    NoClassDefFound in JSP

    frank starsinic Newbie

      jboss version: 2.4.1
      jdk version: 1.3.1
      o/s: windows 2000

      the following jsp page will compile properly
      but i get a NoClassDefFoundError when it
      is executed.
      Under what conditions would this be possible...
      The page is part of a .war archive
      which is part of an .ear archive.

      In other words, the internal jsp compiler knows
      about the classes but somehow Tomcat does not?
      Does this make sense? how do i resolve this issue.
      Sounds like a jar file is not quite "everywhere it needs to be"??

      below is the sample jsp page i wrote to
      test this problem. the stacktrace follows.

      **********************JSP Page*************************
      <%@ page import="gov.ca.boe.wf.BaseActivity"%>
      <%@ page import="gov.ca.boe.afsp.entirex.EfilingEntireXClient"%>

      <%
      EfilingEntireXClient eex;
      BaseActivity base;
      %>

      <%
      eex = new EfilingEntireXClient();
      %>
      ******************* End of JSP Page***********************

      if i comment out the third line of code...
      eex = new EfilingEntireXClient()

      then it does execute properly.


      what does this indicate?

      Here is the error i get saying
      BaseActivity is not found...

      <h1>Error: 500</h1>
      <h2>Location: /afsp/classpath.jsp</h2>Internal Servlet Error:javax.servlet.ServletException: gov/ca/boe/wf/BaseActivity
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:508)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
      at org.apache.tomcat.core.Handler.service(Handler.java:287)
      at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
      at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
      at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
      at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
      at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
      at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
      at java.lang.Thread.run(Thread.java:484)

      Root cause:
      java.lang.NoClassDefFoundError: gov/ca/boe/wf/BaseActivity
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at javax.management.loading.MLet.findClass(MLet.java:775)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
      at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:446)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
      at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:136)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
      at _0002fclasspath_0002ejspclasspath_jsp_4._jspService(_0002fclasspath_0002ejspclasspath_jsp_4.java:192)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
      at org.apache.tomcat.core.Handler.service(Handler.java:287)
      at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
      at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
      at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
      at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
      at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
      at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
      at java.lang.Thread.run(Thread.java:484)