tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <>
Subject Re: Question concerning java.lang.NoClassDefFoundError: javax/servlet/ServletContext
Date Tue, 06 Dec 2005 11:30:15 GMT
See -

Odds are you have your own servlet-api.jar somewhere in the webapp or system 
classpath and that is conflicting with the one in common/lib (installed by 


John Poley wrote:
> Please forgive my intrusion if this is not the proper place to post a questoon of this
sort.  I am new to servlets, and am working on my first deployment- but I am running in to
a problem that I can't find a solution to.  I have installed Tomcat 5.5 and am using Eclipse
(as well as a tomcat plugin) to manage my project.   A colleague of mine sent me a war file
of out working projected, which I imported to my IDE.  I start tomcat, which seems to load
properly, and attempt to run the project on the server- where I am faced with the following:
> javax.servlet.ServletException: Servlet.init() for servlet RequestTranslator threw exception
> root cause 
> java.lang.NoClassDefFoundError: javax/servlet/ServletContext
> 	java.lang.Class.getDeclaredConstructors0(Native Method)
> 	java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
> 	java.lang.Class.getConstructor0(Unknown Source)
> 	java.lang.Class.getConstructor(Unknown Source)
> 	freemarker.template.Configuration.setServletContextForTemplateLoading(
> 	verkoopen.boundary.UserInterfaceOutput.<init>(
> 	verkoopen.boundary.RequestTranslator.init(
> 	org.apache.catalina.valves.ErrorReportValve.invoke(
> 	org.apache.catalina.connector.CoyoteAdapter.service(
> 	org.apache.coyote.http11.Http11Processor.process(
> 	org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
> 	org.apache.tomcat.util.threads.ThreadPool$
> Source)
> I am using the most recent J2RE 5 and I am certain that Tomcat's servlet-api.jar is within
my application's class path.  I am not sure why the source cannot be found.  Any helpin locating
my problem would be greatly appreciated, and I would be happy to prove more information if
needed (I'm not entirely sure what would be helpful).  And again, I am sorry if this is not
the place for this kind of question!Happy coding!John

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

View raw message