tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <>
Subject Re: JDBC connection issue
Date Thu, 16 Aug 2007 19:50:21 GMT
I just checked the docs and the order in which classloaders are searched 
hasn't changed from 5.5 -> 6.0.  Still have to be careful a specific 
class is only found once in the classloader tree from the perspective of 
the webapp.


Gregor Schneider wrote:

>I see, so things quite changed from 5 to 6, however:
>When it comes to a Tomcat 5.x, it still goes that you put your jar
>(i.e. a jdbc-driver)
>in $CATALINA_HOME/lib (when used from Tomcat AND other webapps)
>in $CATALINA_HOME/webapps/yourwebapp/WEB-INF/lib (when used by a
>specific web-app only)
>When reading,
>one thing jumped into my eyes:
>When a request to load a class from the web application's WebappX
>class loader is processed, this class loader will look in the local
>repositories first, instead of delegating before looking.
>That's the big difference, before the classloader was delegating, and
>then you could run into problems, i.e. there was a jdbc-driver both in
>common/lib, one in WEB-INF/lib, and both having different versions -
>the one from common/lib always got loaded, so that problem seems to be
>fixed now.
>However, with the new classloading-model in Tomcat 6 and the comments
>from the docs above, it shouldn't matter whether you have them both in
>$CATALINA_HOME/lib and webapps/your_app/WEB-INF/lib since the one from
>your webapp gets loaded anyways, right?

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message