tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Bainbridge <jbainbri...@gmail.com>
Subject Re: Funny JAR file, WAS: Class.forName() gives NoClassDefFoundError
Date Wed, 08 Jun 2005 20:51:44 GMT
On 6/8/05, Torsten Römer <torsten.roemer@luniks.net> wrote:
> Just want to follow up on this.
> 
> Originally, the classes under /WEB-INF/classes were in a JAR file, which
> I put in /WEB-INF/lib, but like this I always got NoClassDefFoundError.
> 
> So I thought there may be something wrong with the JAR file. I then
> zipped the classes manually and replaced the JAR file with that. And see
> there: No more NoClassDefFoundErrors.
> 
> The application JAR is, like the WAR file, created by an Ant task. It
> can be opened/extracted without problems, but if I put it in Tomcat, I
> always get NoClassDefFoundError. If I zip the classes manually, it works
> just fine...
> 

Sounds more like a classloader/classpath problem, NoClassDefFoundError
means it is finding multiple copies of the class.

Are you setting your system classpath as well by any chance? If you
are then you shouldn't be.

Regards,
-- 
Jason Bainbridge
http://kde.org - webmaster@kde.org
Personal Site - http://jasonbainbridge.com

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


Mime
View raw message