tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bocalinda <bocali...@gmail.com>
Subject Re: Connection between ListenerStart and clustering
Date Fri, 02 Oct 2009 23:11:41 GMT
> > 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
>
> As I recall, the webapp classloader takes precedence over the system
> classloader (the -cp path handler), but I'd have to check the code to be
> sure.  Also, on Tomcat 6, there is no shared lib directory, unless you have
> modified conf/catalina.properties.
>
> > In which case I don't understand why my webapp complains
> > that it can't find the class...
>
> Timing issues can cause things to be loaded in a different order; if the
> class from Tomcat's lib or the system classpath gets loaded first, you will
> not be able to cast references to its objects to the class in WEB-INF/lib
> directory.  This often results in the somewhat misleading NCDFE.
>
> I'm sorry, but I'm missing something here... What causes timing issues? How
can a classloading order be changed from one minute to the other? I would
suppose the classloading ritual is a serial process, instead of a parallel
process. First A than B. And not; "let's start A and B at the same time and
hope that A finishes first."

Can a clustering problem be at the root of this problem, and thus cause some
kind of timing issue and load the classes in a different order?


> So the Spring jars exist *only* in WEB-INF/lib?
>
>
That I did not say :) I need will need to check that tomorrow. What I'm
saying is that I don't think that any class in common/lib references to
spring.

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