2013/8/22 D C <dc12...@gmail.com>: > On Thu, Aug 22, 2013 at 11:48 AM, Konstantin Kolinko <knst.koli...@gmail.com >> wrote: > >> 2013/8/22 Daniel Mikusa <dmik...@gopivotal.com>: >> > On Aug 21, 2013, at 4:09 PM, David kerber <dcker...@verizon.net> wrote: >> > >> >> Basically you're trying to defeat the way the system is designed to >> work. Don't do that… >> > >> > +1 Don't do what you've described unless you have a very good reason. >> It will cause you many headaches. >> > >> > Keep all of your JAR files in "WEB-INF/lib", with the exception of JDBC >> drivers. Put those in "$CATALINA_BASE/lib". >> > >> > Dan >> > >> >> 1. >> +1. >> >> Adding webapp libraries to the common classloader (by placing them >> into ${catalina.base}/lib or by modifying the definition of >> common.loader) is a bad idea. >> (as documented and as discussed many times on this mailing list) >> >> IF you want to decouple libraries from your war, add them to your >> webapp's classpath, by configuring a VirtualWebappLoader , >> >> http://tomcat.apache.org/tomcat-7.0-doc/config/loader.html#VirtualWebappLoader_Implementation > > > Interesting. I just tried this out, but I'm not having luck. > We load the context of the app from > $catalina_home/conf/Catalina/localhost/myApp.xml > > I tried adding the Loader to my context so it looks like this. Am I doing > something wrong. > > > > <?xml version='1.0' encoding='utf-8'?> > <Context> > > <Loader className="org.apache.catalina.loader.VirtualWebappLoader" > virtualClasspath="/web/lib;/web/lib/*.jar"/>
Looks OK, if those paths are correct. You can enable debug logging for that class and it will list whatever jars it finds. Is the following shell command able to list your jar files? ls /web/lib/ > /opt/tomcat-6.0.35 > /opt/tomcat-7.0.39 > /opt/tomcat-7.0.40 > /tomcat symlinks to which ever /opt/tomcat-7.0.40 You are using 7.0.40, 7.0.42, or some ancient version? Do you know how configure Tomcat with separate $CATALINA_BASE and $CATALINA_HOME? Do they have the same value for you, or different ones? (As printed by catalina.sh just before Tomcat starts). Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org