tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <>
Subject Re: On my Webserver: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
Date Sat, 25 Jul 2009 23:50:33 GMT
What jars are in your webapp?  Did you include any that might duplicate
those distributed in the servlet-api.jar file?


Paul van Hoven wrote:
> I just rented a server for providing an internet service. Before, i
> developped the application on my local machine which is running mac os
> x leopard. I also installed tomcat for testing my application. After
> creating a war file i place the webapp in the CATALINA_HOME/webapps
> folder on my local machine. After starting tomcat i can access the
> webapp on http://localhost:8080/myapp. It runs fine and everything
> works as expected. I also include all the necessary jars in the
> WEB-INF/lib folder.
> Okay so far so good, now, i copied the war file (that actually runs
> fine on my local machine) to the server into the folder
> CATALINA_HOME/webapps, as it should be done. Then, i start tomcat
> 6.0.20. The webserver starts fine and accessing it by entering
> the tomcat welcome page is greeting. I
> switch into the manager and it tells me that my app is loaded. But
> when i click on the link to the deployed webapp i get an error 500 and
> the following exception is thrown:
> javax.servlet.ServletException: Error allocating a servlet instance
> org.apache.catalina.valves.ErrorReportValve.invoke(
> org.apache.catalina.connector.CoyoteAdapter.service(
> org.apache.coyote.http11.Http11Processor.process(
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
> root cause
> java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
>    java.lang.ClassLoader.defineClass1(Native Method)
>    java.lang.ClassLoader.defineClass(
> ...
> Actually i do not understand this. The environment variables are set
> as follows:
> /usr/local/apache-tomcat-6.0.20/bin# ./
> Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.20
> Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.20
> Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.20/temp
> Using JRE_HOME:       /usr/bin
> But i also set the variables explicitly in my .bashrc by
> export CATALINA_HOME=/usr/local/apache-tomcat-6.0.20
> export CATALINA_BASE=/usr/local/apache-tomcat-6.0.20
> I start tomcat with root privileges. Every other app like the ones in
> are working fine.
> What is causing this problem?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message