On Aug 21, 2013, at 4:33 PM, David kerber <dcker...@verizon.net> wrote:
> On 8/21/2013 4:27 PM, Daniel Mikusa wrote: >> 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". > > And even the JDBC drivers only if Tomcat is handling your db connection > pooling. If your app does that, then keep them in WEB-INF/lib as well. Personally, I like to keep my drivers in "$CATALINA_BASE/lib" regardless of how they are being used. It's been my experience that some drivers don't behave correctly when hot deploying / undeploying apps. Keeping the driver in "$CATALINA_BASE/lib" works around this problem. That is just my preference though, because I've been hit by this in the past. Dan > > >> >> Dan >> >>> >>> >>> On 8/21/2013 3:58 PM, D C wrote: >>>> Tomcat 7.0.40 >>>> CentOS 6.3 >>>> Java 1.7.0_21 >>>> >>>> >>>> I am trying to move all libraries out of my webapps directory, and into a >>>> common place. >>>> >>>> I have my libs that were bundled with tomcat in /tomcat/lib (the default), >>>> and my extra libs i want to keep in /web/lib. >>>> >>>> I've updated /tomcat/conf/catalina.properties to use the following: >>>> common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,/web/lib,/web/lib/*.jar >>>> >>>> I have my database resource located in >>>> /tomcat/conf/Catalina/localhost/myApp.xml (probably not relevant) >>>> >>>> When I start tomcat, I get the errors listed below. However if I move >>>> /web/lib/* to webapps/myApp/WEB_INF/lib/ it works fine. >>>> >>>> What am I missing here? >>>> >>>> >>>> catalina.out snip. >>>> SEVERE: ContainerBase.addChild: start: >>>> org.apache.catalina.LifecycleException: Failed to start component >>>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myApp]] >>>> at >>>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) >>>> at >>>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) >>>> at >>>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) >>>> at >>>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) >>>> at >>>> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657) >>>> at >>>> org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1636) >>>> at >>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) >>>> at >>>> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) >>>> at java.util.concurrent.FutureTask.run(FutureTask.java:166) >>>> at >>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) >>>> at >>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) >>>> at java.lang.Thread.run(Thread.java:722) >>>> Caused by: java.lang.NoClassDefFoundError: >>>> org/springframework/core/io/Resource >>>> at java.lang.Class.getDeclaredFields0(Native Method) >>>> at java.lang.Class.privateGetDeclaredFields(Class.java:2317) >>>> at java.lang.Class.getDeclaredFields(Class.java:1762) >>>> at >>>> org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106) >>>> at >>>> org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:261) >>>> at >>>> org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:90) >>>> at >>>> org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65) >>>> at >>>> org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:405) >>>> at >>>> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:881) >>>> at >>>> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369) >>>> at >>>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) >>>> at >>>> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) >>>> at >>>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269) >>>> at >>>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) >>>> ... 11 more >>>> Caused by: java.lang.ClassNotFoundException: >>>> org.springframework.core.io.Resource >>>> at >>>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) >>>> at >>>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) >>>> ... 25 more >>>> >>>> >>>> >>>> Thanks, >>>> Dan >>>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org