tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Birch <cpbi...@mac.com>
Subject Re: Question concerning java.lang.NoClassDefFoundError: javax/servlet/ServletContext
Date Tue, 06 Dec 2005 23:54:18 GMT
NoClassDefinition errors are normally thrown if the class or JAR isn't 
in the classpath, the only other time this happens is when the 
ClassLoader isn't able to load the class path because an exception is 
thrown on any static initialisers.

(This is conjecture...) It may be the ServletContext has a static { ... 
} block that is throwing an error for some reason, the class can't be 
loaded and is therefore not available, hence the NoClassDefinition 
found error.

However, I don't understand why your code is moaning about 
ServletContext when it doesn't look like you are anywhere near it.

Kind Regards,
Chris.

On 6 Dec 2005, at 17:44, Armand Rock wrote:

> Hello David,
> I included all jar & zip files on my computer, including j2ee.jar and 
> I'm
> still having the problem.
> I have just noticed a weird behaviour though, if I try to reload the 
> jsp
> right after the jsp fails the first
> time it seems to run without throwing the exception.  If I restart 
> Tomcat
> and try again the problem starts
> again.  I could get this to work in theory by forcing it to run 
> through the
> code once on startup
> but I shouldn't have to do that and I honestly would prefer getting it 
> to
> work as it should.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message