[tomcat@test05 logs]# grep "from file" catalina.out  | sed 's/.*from
file//g' | sed 's/\/lib\/.*/\/lib/g' | sort -u
:/opt/apache-tomcat-7.0.40/bin/bootstrap.jar]
:/opt/apache-tomcat-7.0.40/bin/tomcat-juli.jar]
:/opt/apache-tomcat-7.0.40/lib
:/opt/jdk1.7.0.21/jre/lib
:/web/webapps/myApp/WEB-INF/classes/com/myco/management/spring_utils/ContextLoaderListener.class]
:/web/webapps/myApp/WEB-INF/lib



Thanks,
Dan


On Thu, Aug 22, 2013 at 6:47 AM, Daniel Mikusa <dmik...@gopivotal.com>wrote:

> On Aug 21, 2013, at 5:09 PM, D C <dc12...@gmail.com> wrote:
>
> > I added verbose,  it does not appear to attempt to load anything from
> > /web/lib/
>
> Ok.  Where do you see it loading classes from?  /WEB-INF/lib/*.jar?  Do
> you see any classes listed that you would expect to be loaded from
> /web/lib? Where are they being loaded from?
>
> > for permissions i verified that i could read the files as the tomcat
> user.​
>
> Good
>
> > Thanks,
> > Dan
> >
> >
> > On Wed, Aug 21, 2013 at 5:01 PM, Daniel Mikusa <dmik...@gopivotal.com
> >wrote:
> >
> >> On Aug 21, 2013, at 4:48 PM, D C <dc12...@gmail.com> wrote:
> >>
> >>> So here is what I'm trying to achieve.
> >>>
> >>> 1. The tomcat install remains clean.  I want to be able to change the
> >>> tomcat installation without messing with the app.
> >>> 2. We want our applications to be decoupled from the libraries which it
> >>> needs.  ( i understand the pains you are referring to..  this was a bit
> >> of
> >>> debate, but this is what we want to do).
> >>> 3. We want our engineering team to manage libs via RPM, not the
> >> developers.
> >>>
> >>> tomcat is installed like so via RPM.
> >>> /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
> >>>
> >>> Context entries go in /tomcat/conf/Catalina/localhost/myApp.xml
> >>>
> >>> /web/webapps - holds our webapps.  This much works perfectly.
> >>> /web/conf/myApp - holds our application configs.
> >>> /web/lib - holds any libs that are not part of the base tomcat
> >>> installation.  This is managed by rpm.
> >>>
> >>> If unpack a war file, and it has contents inside WEB_INF/lib,  we will
> >>> consider that a broken build.
> >>>
> >>>
> >>> Everything works, except that my libs are not loading..  I had thought
> >> that
> >>> I could add /web/lib,/web/lib/*.jar to the common.loader.  Am I
> mistaken
> >> by
> >>> this?
> >>
> >> You can certainly add entries to common.loader and yours looks OK.
> >>
> >> Assuming the paths exist and permissions on those paths are correct, I'd
> >> suggest adding the "-verbose" JVM argument to your bin/setenv.sh file.
> >> This will show you the location of classes that are being loaded.
>  Perhaps
> >> it is loading classes from those locations and there is some other
> reason
> >> you are getting the ClassNotFoundException.
> >>
> >> Dan
> >>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> Thanks,
> >>> Dan
> >>>
> >>>
> >>> On Wed, Aug 21, 2013 at 4:27 PM, Daniel Mikusa <dmik...@gopivotal.com
> >>> 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".
> >>>>
> >>>> 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
>
>

Reply via email to