tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Harrison" <>
Subject Re: NoClassDefFoundError when running JSPs
Date Mon, 20 Mar 2000 20:52:01 GMT
I had this kind of problem recently, and found the easy way to configure my system :

The JSDK 1.2 has a built in 'extension' mechanism which you can use to compile and run with
any classes you wish to have available for any project.  Simple add the extensions (ie servlet.jar,
jasper.jar etc ) to the "jsdk1.2/jre/lib/ext" directory.  Ensure you have JAVA_HOME environmental
variable set to the jsdk 1.2 directory, and that the jsdk1.2/bin directory is in your PATH.
 Finally make sure there is no CLASSPATH set, as this just serves to stuff things up.

I am using Tomcat with JDSK 1.2 - and it is working with both Windows98 and Caldera Linux.

Short note re Caldera Linux : I believe Kaffe is supplied as default with Caldera Linux. 
The java and javac commands are in the usr/bin directory, in effect stuffing any attempt to
add paths to new versions of Java.  I had to delete kaffe, including all the java programs
in /usr/bin before I got Java 1.2 working.

This will probably however stuff the current version of JServ if you have it installed first
(as I did) so you will need to run tomcat instead.  I have spent several weeks on a rather
steep learning curve on Linux/Java/Servlets/JDBC.  I am now writing Java Servlets which access
my account system interbase database.  
  ----- Original Message ----- 
  From: Don Metzler 
  Sent: Monday, March 20, 2000 6:52 PM
  Subject: NoClassDefFoundError when running JSPs

  I can run the servlet examples via Tomcat.  However, each time I attempt to access a JSP,
I get an HTTP 500 Internal server error on the client web browser.

  The Tomcat window in NT shows:

  Starting tomcat. Check logs/tomcat.log for error messages
  Unhandled error! You might want to consider having an error page to report such
  errors more gracefully
  java.lang.NoClassDefFoundError: sun/tools/javac/Main
          at org.apache.jasper.compiler.SunJavaCompiler.compile(
          at org.apache.jasper.compiler.Compiler.compile(, Compiled Code)
          at org.apache.jasper.runtime.JspServlet.loadJSP(
          at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(
          at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(
          at org.apache.jasper.runtime.JspServlet.serviceJspFile(
          at org.apache.jasper.runtime.JspServlet.service(, Compiled Code)
          at javax.servlet.http.HttpServlet.service(
          at org.apache.tomcat.core.ServletWrapper.handleRequest(, Compiled
          at org.apache.tomcat.core.ContextManager.service(
          at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(

  This seems to indicate that I am missing a Java class or JAR.

  I do have J2EE installed over the J2SE.  Any idea what I am missing?



View raw message