tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Poley" <j...@jpoley.com>
Subject Re: Question concerning java.lang.NoClassDefFoundError: javax/servlet/ServletContext
Date Mon, 19 Apr 2004 10:27:25 GMT
*sigh* it just had to be something simple, didn't it?  Even right in front
of me with the
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html page that
someone suggested earlier.  I put freemarker in the tomcat/shared/lib
directory and all is well.  I am having serious issues grasping this
classloader thing, apparently   =)

Thanks for the help, all!


----- Original Message ----- 
From: "Tim Funk" <funkman@joedog.org>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Wednesday, December 07, 2005 9:01 PM
Subject: Re: Question concerning java.lang.NoClassDefFoundError:
javax/servlet/ServletContext


> BINGO!!!!!
>
> freemarker.jar does not belong in the system classloader. It belongs in
> WEB-INF/lib.
>
> [ Quick rule of thumb - putting a lib in java/lib/ext will cause problems
99%
> of the time.  ]
>
> -Tim
>
> John Poley wrote:
> > And as for me, since we seem to be having similar issues, I cut out
eclipse
> > all together, worried that somehow it was cause some kind of issue.   I
have
> > a .war file that was was exported by a colleague who is running the same
> > .war within tomcat and having no trouble at all with it.  I copy that
.war
> > file into the webapps directory of a freshly installed tomcat where I
have
> > changed no settings.  I start tomcat, and then open a browser to either
the
> > simple HelloServlet file he included in the .war as a test or the actual
> > servlet we are preparing-  in both cases I get this same
> > NoClassDefFoundError.   I do not have j2ee on this system, and I have
run a
> > complete search for servlet.jar and j2ee.jar files in the hard drive and
> > found none other than servlet-api.jar that lies within
tomcat/common/lib.
> > I am using a newly installed J2SE, JDK 5.0 Update 6, with no other java
> > libraries installed.  The only files I have added to java/lib/ext are
> > freemarker.jar and and a mysql-connector jar.
> > Am I missing something somewhere?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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


Mime
View raw message