noclassdeffounderror « Tomcat « JSP-Servlet Q&A

1. Under Tomcat java.lang.NoClassDefFoundError when accessing a servlet?

I'm writing a web applicaion in Eclipse, and I'm using the XStream Serialization Library to generate My JSON. I've encapsulated the Code that builds up the JSON in a class which is ...

2. java.lang.NoClassDefFoundError: com/hp/hpl/jena/shared/BadURIException on running servlet

I get a "java.lang.NoClassDefFoundError: com/hp/hpl/jena/shared/BadURIException" when running a very simple servlet. The error points back to the initialisation of the "Tagger" class. The code is as follows


import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import ...

3. java.lang.NoClassDefFoundError

Everything was working just fine but now I can no longer run my application. For some reason javax.* is not being found yet in Eclipse the imports are fine...


javax.servlet.ServletException: Error ...

4. NoClassDefFoundError when trying to reference external jar files

I have some 3rd party jar files that I want to reference in my tomcat web application. I added this line to shared.loader=/home/ollie/dev/java/googleapi_samples/gdata/java/lib/*.jar but I'm still getting this error:

org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: com/google/gdata/util/ServiceException

5. NoClassDefFoundError in Eclipse (using jsp and tomcat)

I am receiving an NoClassDefFoundError in Eclipse when I try to run my project. My Project looks like this:

JavaProject: BulkAdmin
   - src

6. javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/tomcat/InstanceManager

I have been facing challenges in understanding the issue behind the exception trace thrown while i access my web application through tomcat 6.0.33. Below are the detailed exception trace. FYI. the ...