tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bocalinda <>
Subject Re: Connection between ListenerStart and clustering
Date Fri, 02 Oct 2009 22:45:29 GMT
Hi Chuck,

That's a good point. First thing in the morning I will check out.

I know the basics of the Tomcat classloading principle. However, I'm trying
to imagine myself the situation where a duplication of a class leads to an
ClassNotFound error (It's quite ironic honestly :))

If I'm not wrong Tomcat loads it classes in the following order:

1. bootstrap
2. classpath classes
3. webapps classes/libs
4. common libs
5. shared libs

Let's say that my webapp uses a class that is both placed in web-inf/lib and
common/lib. According to the classloading order, the class that is in my
web-inf/lib should be loaded first. In which case I don't understand why my
webapp complains that it can't find the class...

The only thing I can think of is that my webapp's classloader loads class X
from web-inf/lib, and that this class is used by some other class in

Although, I don't think this is the case in my situation. Spring is only
used inside my webapp.

I'm probably overseeing something basic here, and would really appreciate it
if somebody could point me out what it is.


2009/10/2 Caldarale, Charles R <>

> > From: Bocalinda []
> > Subject: Re: Connection between ListenerStart and clustering
> >
> > The class mentioned is actually there....
> > java.lang.NoClassDefFoundError:
> > org/springframework/web/context/ContextLoaderListener
> Is the class perhaps in too many places?  It must not appear in more than
> one location in any given branch of the classloader tree.  For example, you
> must not place the class in both Tomcat's lib directory and the webapp's
> WEB-INF/lib directory - it has to be one or the other.
>  - Chuck
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message