You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by D C <dc...@gmail.com> on 2013/08/21 21:58:00 UTC

Having trouble with common.loader

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

Re: Having trouble with common.loader

Posted by Mark Eggers <it...@yahoo.com>.
On 8/21/2013 12: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?
> Thanks,
> Dan
>

First of all, don't do this.

Seriously, there are really no good reasons to do this and many, many 
reasons not to.

Now, let's look at where you put your jars:

You said you put them in /web/lib - where is /web/lib located?

In the above catalina.properties line, you added:

/web/lib/*.jar

This is an absolute path, where /web is at the root of your file system.

I doubt you a) meant to put the JARs there, and b) have read permission 
on that directory should it even exist. You have three options for 
describing the directory location:

${property.name}/directory/. . . . ./*.jar

where property.name is either catalina.home or catalina.base.

some-other-directory/. . . ./*.jar
../some-other-directory/. . . ./*.jar

where the location is relative to catalina.base ($CATALINA_BASE).

/some-absolute-directory/path/*.jar

which just as it says, is an absolute directory path.

There may be other property.name(s) exposed - read the documentation.

Can you explain your use case for doing this? This will make a mess of 
builds, and who knows what will happen if a developer uses a different 
version of a library in a web application.

a) will it fail because the library operation is different?
b) will you get spurious class not found exceptions?
c) will the developer remember to leave some JARs out, but include ones
    that you left out?

Inquiring minds really don't want to think about the above mess. I know 
system administrators don't.

. . . . just my two cents.
/mde/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Having trouble with common.loader

Posted by Daniel Mikusa <dm...@gopivotal.com>.
On Aug 22, 2013, at 12:32 PM, D C <dc...@gmail.com> wrote:

> On Thu, Aug 22, 2013 at 11:57 AM, Daniel Mikusa <dm...@gopivotal.com>wrote:
> 
>> On Aug 22, 2013, at 11:31 AM, D C <dc...@gmail.com> wrote:
>> 
>>> On Thu, Aug 22, 2013 at 10:30 AM, Daniel Mikusa <dmikusa@gopivotal.com
>>> wrote:
>>> 
>>>> On Aug 22, 2013, at 9:21 AM, D C <dc...@gmail.com> wrote:
>>>> 
>>>>> Ok, here goes.  grep -v '/opt/jdk'
>>>> 
>>>> <snip>  Removing some of the fluff.
>>>> 
>>>>> Aug 21, 2013 5:08:03 PM org.apache.catalina.startup.HostConfig
>>>>> deployDescriptor
>>>>> INFO: Deploying configuration descriptor
>>>>> /opt/apache-tomcat-7.0.40/conf/Catalina/localhost/myApp.xml
>>>> 
>>>> Ok, myApp is deployed here...
>>>> 
>>> 
>>> So far working as expected.
>>> ​​
>>> 
>>>> 
>>>>> [Loaded org.springframework.web.SpringServletContainerInitializer from
>>>>> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
>>>>> [Loaded org.springframework.web.WebApplicationInitializer from
>>>>> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
>>>> 
>>>> We can see that some of the Spring classes are being loaded from
>>>> "WEB-INF/lib".  Were you expecting this?
>>>> 
>>> ​
>>> 
>>> This is an example of something our developers will need to clean up
>> before
>>> we release... But yes it was expected.
>>> 
>>> 
>>>>> [Loaded org.springframework.web.context.ContextLoader from
>>>>> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
>>>>> [Loaded org.springframework.web.context.ContextLoaderListener from
>>>>> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
>>>> 
>>>> More Spring classes loaded from WEB-INF/ilb.  Again, were you expecting
>>>> this?
>>>> 
>>> 
>>> Yup.
>>> ​​
>>> 
>>>> 
>>>>> [Loaded com.myco.management.spring_utils.ContextLoaderListener from
>>>>> 
>>>> 
>> file:/web/webapps/myApp/WEB-INF/classes/com/myco/management/spring_utils/ContextLoaderListener.class]
>>>> 
>>>> Looks like one of your custom classes is being loaded.  No big deal.
>>>> 
>>>>> Aug 21, 2013 5:08:07 PM org.apache.catalina.core.ContainerBase
>>>>> addChildInternal
>>>>> SEVERE: ContainerBase.addChild: start:
>>>> 
>>>> App start fails...
>>>> 
>>>>> 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
>>>> 
>>>> Missing class is org.springframework.core.io.Resource.  Where is your
>>>> spring-core-3.1.0.RELEASE.jar file?
>>>> 
>>> 
>>> 
>>> /web/lib/spring-core-3.1.0.RELEASE.jar
>>> 
>>> 
>>>> 
>>>> Looking further...
>>>> 
>>>>> 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)
>>>> 
>>>> The stack trace seems to indicate that this error occurred while the
>>>> container was scanning for annotations.  Is your application making use
>> of
>>>> Spring's WebApplicationInitializer functionality?  If not, you might
>> want
>>>> to disable it and see if the error goes away.
>>>> 
>>> 
>>> Sorry I don't know.  ​​
>> 
>> Try disabling it and see what happens.
>> 
>> Edit "conf/catalina.properties" and set
>> "org.apache.catalina.startup.ContextConfig.jarsToSkip" to "spring-*.jar".
>> That should instruct Tomcat to skip processing the Spring jar files for
>> Servlet 3.0 pluggability features like web fragments, annotations & SCIs.
>> 
>>> We just tried adding every jar file in /web/lib/ to the class path
>> 
>> What do you mean by this?  How did you add them to the class path?  Did
>> you copy them into WEB-INF/lib?
>> 
> 
> ​No the environment variable in setenv.sh
> CLASSPATH=........every jar​

I'm surprise that actually worked.  The catalina script will typically ignore attempts to set CLASSPATH directly.  I would really, really suggest you don't do this.

> 
> 
> 
>> 
>>> and that seemed to work out, so this brings me back to whats wrong with
>>> common.loader?
>>> 
>>> 
>> common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/web/lib,/web/lib/*.jar
>> 
>> Syntax looks fine to me.  As myself and others mentioned originally,
>> sharing classes with the common class loader causes lots of headaches.  I
>> would say that you've found one here.
>> 
>> A suggestion for debugging further, remove the "-verbose" JVM argument and
>> set the log level for org.apache.catalina.loader.WebappClassLoader to FINE.
>> The WebappClassLoader has some debugging information that it should write
>> to the logs.  This could give us further clues as to what is happening.
>> 
>> Dan
>> 
> 
> I've removed -verbose, and added

> that org.apache.catalina.loader.WebappClassLoader = FINE in logging.properties.

To set the log level for org.apache.catalina.loader.WebappClassLoader to "FINE", you need to set the following in logging.properties.

  org.apache.catalina.loader.WebappClassLoader.level = FINE

You should see output like this…

Aug 22, 2013 12:46:33 PM org.apache.catalina.loader.WebappClassLoader findClass
FINE:     findClass(<class>)

Dan

> 
> Nothing new in the log.
> ​​
> 
>> 
>> 
>> 
>>> 
>>> 
>>> 
>>>> Dan
>>>> 
>>>>> 
>>>>> 
>>>>> On Thu, Aug 22, 2013 at 8:58 AM, Daniel Mikusa <dmikusa@gopivotal.com
>>>>> wrote:
>>>>> 
>>>>>> On Aug 22, 2013, at 8:38 AM, D C <dc...@gmail.com> wrote:
>>>>>> 
>>>>>>> [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
>>>>>> 
>>>>>> Can you show the unaltered output?  If you want to filter out stuff to
>>>>>> make it smaller, filter out any classes that were loaded from the JDK.
>>>>>> 
>>>>>> Dan
>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> Dan
>>>>>>> 
>>>>>>> 
>>>>>>> On Thu, Aug 22, 2013 at 6:47 AM, Daniel Mikusa <
>> dmikusa@gopivotal.com
>>>>>>> wrote:
>>>>>>> 
>>>>>>>> On Aug 21, 2013, at 5:09 PM, D C <dc...@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 <
>>>> dmikusa@gopivotal.com
>>>>>>>>> wrote:
>>>>>>>>> 
>>>>>>>>>> On Aug 21, 2013, at 4:48 PM, D C <dc...@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 <
>>>>>> dmikusa@gopivotal.com
>>>>>>>>>>> wrote:
>>>>>>>>>>> 
>>>>>>>>>>>> On Aug 21, 2013, at 4:09 PM, David kerber <dckerber@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-unsubscribe@tomcat.apache.org
>>>>>>>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>> ---------------------------------------------------------------------
>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>>> 
>>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>> 
>>>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>> 
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Having trouble with common.loader

Posted by D C <dc...@gmail.com>.
On Thu, Aug 22, 2013 at 11:57 AM, Daniel Mikusa <dm...@gopivotal.com>wrote:

> On Aug 22, 2013, at 11:31 AM, D C <dc...@gmail.com> wrote:
>
> > On Thu, Aug 22, 2013 at 10:30 AM, Daniel Mikusa <dmikusa@gopivotal.com
> >wrote:
> >
> >> On Aug 22, 2013, at 9:21 AM, D C <dc...@gmail.com> wrote:
> >>
> >>> Ok, here goes.  grep -v '/opt/jdk'
> >>
> >> <snip>  Removing some of the fluff.
> >>
> >>> Aug 21, 2013 5:08:03 PM org.apache.catalina.startup.HostConfig
> >>> deployDescriptor
> >>> INFO: Deploying configuration descriptor
> >>> /opt/apache-tomcat-7.0.40/conf/Catalina/localhost/myApp.xml
> >>
> >> Ok, myApp is deployed here...
> >>
> >
> > So far working as expected.
> > ​​
> >
> >>
> >>> [Loaded org.springframework.web.SpringServletContainerInitializer from
> >>> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
> >>> [Loaded org.springframework.web.WebApplicationInitializer from
> >>> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
> >>
> >> We can see that some of the Spring classes are being loaded from
> >> "WEB-INF/lib".  Were you expecting this?
> >>
> > ​
> >
> > This is an example of something our developers will need to clean up
> before
> > we release... But yes it was expected.
> >
> >
> >>> [Loaded org.springframework.web.context.ContextLoader from
> >>> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
> >>> [Loaded org.springframework.web.context.ContextLoaderListener from
> >>> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
> >>
> >> More Spring classes loaded from WEB-INF/ilb.  Again, were you expecting
> >> this?
> >>
> >
> > Yup.
> > ​​
> >
> >>
> >>> [Loaded com.myco.management.spring_utils.ContextLoaderListener from
> >>>
> >>
> file:/web/webapps/myApp/WEB-INF/classes/com/myco/management/spring_utils/ContextLoaderListener.class]
> >>
> >> Looks like one of your custom classes is being loaded.  No big deal.
> >>
> >>> Aug 21, 2013 5:08:07 PM org.apache.catalina.core.ContainerBase
> >>> addChildInternal
> >>> SEVERE: ContainerBase.addChild: start:
> >>
> >> App start fails...
> >>
> >>> 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
> >>
> >> Missing class is org.springframework.core.io.Resource.  Where is your
> >> spring-core-3.1.0.RELEASE.jar file?
> >>
> >
> >
> > /web/lib/spring-core-3.1.0.RELEASE.jar
> >
> >
> >>
> >> Looking further...
> >>
> >>> 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)
> >>
> >> The stack trace seems to indicate that this error occurred while the
> >> container was scanning for annotations.  Is your application making use
> of
> >> Spring's WebApplicationInitializer functionality?  If not, you might
> want
> >> to disable it and see if the error goes away.
> >>
> >
> > Sorry I don't know.  ​​
>
> Try disabling it and see what happens.
>
> Edit "conf/catalina.properties" and set
> "org.apache.catalina.startup.ContextConfig.jarsToSkip" to "spring-*.jar".
>  That should instruct Tomcat to skip processing the Spring jar files for
> Servlet 3.0 pluggability features like web fragments, annotations & SCIs.
>
> > We just tried adding every jar file in /web/lib/ to the class path
>
> What do you mean by this?  How did you add them to the class path?  Did
> you copy them into WEB-INF/lib?
>

​No the environment variable in setenv.sh
CLASSPATH=........every jar​



>
> > and that seemed to work out, so this brings me back to whats wrong with
> > common.loader?
> >
> >
> common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/web/lib,/web/lib/*.jar
>
> Syntax looks fine to me.  As myself and others mentioned originally,
> sharing classes with the common class loader causes lots of headaches.  I
> would say that you've found one here.
>
> A suggestion for debugging further, remove the "-verbose" JVM argument and
> set the log level for org.apache.catalina.loader.WebappClassLoader to FINE.
>  The WebappClassLoader has some debugging information that it should write
> to the logs.  This could give us further clues as to what is happening.
>
> Dan
>

I've removed -verbose, and added
that org.apache.catalina.loader.WebappClassLoader = FINE in
logging.properties.

Nothing new in the log.
​​

>
>
>
> >
> >
> >
> >> Dan
> >>
> >>>
> >>>
> >>> On Thu, Aug 22, 2013 at 8:58 AM, Daniel Mikusa <dmikusa@gopivotal.com
> >>> wrote:
> >>>
> >>>> On Aug 22, 2013, at 8:38 AM, D C <dc...@gmail.com> wrote:
> >>>>
> >>>>> [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
> >>>>
> >>>> Can you show the unaltered output?  If you want to filter out stuff to
> >>>> make it smaller, filter out any classes that were loaded from the JDK.
> >>>>
> >>>> Dan
> >>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> Thanks,
> >>>>> Dan
> >>>>>
> >>>>>
> >>>>> On Thu, Aug 22, 2013 at 6:47 AM, Daniel Mikusa <
> dmikusa@gopivotal.com
> >>>>> wrote:
> >>>>>
> >>>>>> On Aug 21, 2013, at 5:09 PM, D C <dc...@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 <
> >> dmikusa@gopivotal.com
> >>>>>>> wrote:
> >>>>>>>
> >>>>>>>> On Aug 21, 2013, at 4:48 PM, D C <dc...@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 <
> >>>> dmikusa@gopivotal.com
> >>>>>>>>> wrote:
> >>>>>>>>>
> >>>>>>>>>> On Aug 21, 2013, at 4:09 PM, David kerber <dckerber@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-unsubscribe@tomcat.apache.org
> >>>>>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>> ---------------------------------------------------------------------
> >>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>>>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >> ---------------------------------------------------------------------
> >>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> ---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>
> >>>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Having trouble with common.loader

Posted by Daniel Mikusa <dm...@gopivotal.com>.
On Aug 22, 2013, at 11:31 AM, D C <dc...@gmail.com> wrote:

> On Thu, Aug 22, 2013 at 10:30 AM, Daniel Mikusa <dm...@gopivotal.com>wrote:
> 
>> On Aug 22, 2013, at 9:21 AM, D C <dc...@gmail.com> wrote:
>> 
>>> Ok, here goes.  grep -v '/opt/jdk'
>> 
>> <snip>  Removing some of the fluff.
>> 
>>> Aug 21, 2013 5:08:03 PM org.apache.catalina.startup.HostConfig
>>> deployDescriptor
>>> INFO: Deploying configuration descriptor
>>> /opt/apache-tomcat-7.0.40/conf/Catalina/localhost/myApp.xml
>> 
>> Ok, myApp is deployed here...
>> 
> 
> So far working as expected.
> ​​
> 
>> 
>>> [Loaded org.springframework.web.SpringServletContainerInitializer from
>>> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
>>> [Loaded org.springframework.web.WebApplicationInitializer from
>>> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
>> 
>> We can see that some of the Spring classes are being loaded from
>> "WEB-INF/lib".  Were you expecting this?
>> 
> ​
> 
> This is an example of something our developers will need to clean up before
> we release... But yes it was expected.
> 
> 
>>> [Loaded org.springframework.web.context.ContextLoader from
>>> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
>>> [Loaded org.springframework.web.context.ContextLoaderListener from
>>> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
>> 
>> More Spring classes loaded from WEB-INF/ilb.  Again, were you expecting
>> this?
>> 
> 
> Yup.
> ​​
> 
>> 
>>> [Loaded com.myco.management.spring_utils.ContextLoaderListener from
>>> 
>> file:/web/webapps/myApp/WEB-INF/classes/com/myco/management/spring_utils/ContextLoaderListener.class]
>> 
>> Looks like one of your custom classes is being loaded.  No big deal.
>> 
>>> Aug 21, 2013 5:08:07 PM org.apache.catalina.core.ContainerBase
>>> addChildInternal
>>> SEVERE: ContainerBase.addChild: start:
>> 
>> App start fails...
>> 
>>> 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
>> 
>> Missing class is org.springframework.core.io.Resource.  Where is your
>> spring-core-3.1.0.RELEASE.jar file?
>> 
> 
> 
> /web/lib/spring-core-3.1.0.RELEASE.jar
> 
> 
>> 
>> Looking further...
>> 
>>> 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)
>> 
>> The stack trace seems to indicate that this error occurred while the
>> container was scanning for annotations.  Is your application making use of
>> Spring's WebApplicationInitializer functionality?  If not, you might want
>> to disable it and see if the error goes away.
>> 
> 
> Sorry I don't know.  ​​

Try disabling it and see what happens.  

Edit "conf/catalina.properties" and set "org.apache.catalina.startup.ContextConfig.jarsToSkip" to "spring-*.jar".  That should instruct Tomcat to skip processing the Spring jar files for Servlet 3.0 pluggability features like web fragments, annotations & SCIs.

> We just tried adding every jar file in /web/lib/ to the class path

What do you mean by this?  How did you add them to the class path?  Did you copy them into WEB-INF/lib?

> and that seemed to work out, so this brings me back to whats wrong with
> common.loader?
> 
> common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/web/lib,/web/lib/*.jar

Syntax looks fine to me.  As myself and others mentioned originally, sharing classes with the common class loader causes lots of headaches.  I would say that you've found one here.  

A suggestion for debugging further, remove the "-verbose" JVM argument and set the log level for org.apache.catalina.loader.WebappClassLoader to FINE.  The WebappClassLoader has some debugging information that it should write to the logs.  This could give us further clues as to what is happening.

Dan



> 
> 
> 
>> Dan
>> 
>>> 
>>> 
>>> On Thu, Aug 22, 2013 at 8:58 AM, Daniel Mikusa <dmikusa@gopivotal.com
>>> wrote:
>>> 
>>>> On Aug 22, 2013, at 8:38 AM, D C <dc...@gmail.com> wrote:
>>>> 
>>>>> [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
>>>> 
>>>> Can you show the unaltered output?  If you want to filter out stuff to
>>>> make it smaller, filter out any classes that were loaded from the JDK.
>>>> 
>>>> Dan
>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> Thanks,
>>>>> Dan
>>>>> 
>>>>> 
>>>>> On Thu, Aug 22, 2013 at 6:47 AM, Daniel Mikusa <dmikusa@gopivotal.com
>>>>> wrote:
>>>>> 
>>>>>> On Aug 21, 2013, at 5:09 PM, D C <dc...@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 <
>> dmikusa@gopivotal.com
>>>>>>> wrote:
>>>>>>> 
>>>>>>>> On Aug 21, 2013, at 4:48 PM, D C <dc...@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 <
>>>> dmikusa@gopivotal.com
>>>>>>>>> wrote:
>>>>>>>>> 
>>>>>>>>>> On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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-unsubscribe@tomcat.apache.org
>>>>>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>> ---------------------------------------------------------------------
>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>>> 
>>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>> 
>>>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>> 
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Having trouble with common.loader

Posted by D C <dc...@gmail.com>.
On Thu, Aug 22, 2013 at 10:30 AM, Daniel Mikusa <dm...@gopivotal.com>wrote:

> On Aug 22, 2013, at 9:21 AM, D C <dc...@gmail.com> wrote:
>
> > Ok, here goes.  grep -v '/opt/jdk'
>
> <snip>  Removing some of the fluff.
>
> > Aug 21, 2013 5:08:03 PM org.apache.catalina.startup.HostConfig
> > deployDescriptor
> > INFO: Deploying configuration descriptor
> > /opt/apache-tomcat-7.0.40/conf/Catalina/localhost/myApp.xml
>
> Ok, myApp is deployed here...
>

So far working as expected.
​​

>
> > [Loaded org.springframework.web.SpringServletContainerInitializer from
> > file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
> > [Loaded org.springframework.web.WebApplicationInitializer from
> > file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
>
> We can see that some of the Spring classes are being loaded from
> "WEB-INF/lib".  Were you expecting this?
>
​

This is an example of something our developers will need to clean up before
we release... But yes it was expected.


> > [Loaded org.springframework.web.context.ContextLoader from
> > file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
> > [Loaded org.springframework.web.context.ContextLoaderListener from
> > file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
>
> More Spring classes loaded from WEB-INF/ilb.  Again, were you expecting
> this?
>

Yup.
​​

>
> > [Loaded com.myco.management.spring_utils.ContextLoaderListener from
> >
> file:/web/webapps/myApp/WEB-INF/classes/com/myco/management/spring_utils/ContextLoaderListener.class]
>
> Looks like one of your custom classes is being loaded.  No big deal.
>
> > Aug 21, 2013 5:08:07 PM org.apache.catalina.core.ContainerBase
> > addChildInternal
> > SEVERE: ContainerBase.addChild: start:
>
> App start fails...
>
> > 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
>
> Missing class is org.springframework.core.io.Resource.  Where is your
> spring-core-3.1.0.RELEASE.jar file?
>


/web/lib/spring-core-3.1.0.RELEASE.jar


>
> Looking further...
>
> > 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)
>
> The stack trace seems to indicate that this error occurred while the
> container was scanning for annotations.  Is your application making use of
> Spring's WebApplicationInitializer functionality?  If not, you might want
> to disable it and see if the error goes away.
>

Sorry I don't know.  ​​


We just tried adding every jar file in /web/lib/ to the classpath and that
seemed to work out, so this brings me back to whats wrong with
common.loader?

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/web/lib,/web/lib/*.jar




> Dan
>
> >
> >
> > On Thu, Aug 22, 2013 at 8:58 AM, Daniel Mikusa <dmikusa@gopivotal.com
> >wrote:
> >
> >> On Aug 22, 2013, at 8:38 AM, D C <dc...@gmail.com> wrote:
> >>
> >>> [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
> >>
> >> Can you show the unaltered output?  If you want to filter out stuff to
> >> make it smaller, filter out any classes that were loaded from the JDK.
> >>
> >> Dan
> >>
> >>>
> >>>
> >>>
> >>> Thanks,
> >>> Dan
> >>>
> >>>
> >>> On Thu, Aug 22, 2013 at 6:47 AM, Daniel Mikusa <dmikusa@gopivotal.com
> >>> wrote:
> >>>
> >>>> On Aug 21, 2013, at 5:09 PM, D C <dc...@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 <
> dmikusa@gopivotal.com
> >>>>> wrote:
> >>>>>
> >>>>>> On Aug 21, 2013, at 4:48 PM, D C <dc...@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 <
> >> dmikusa@gopivotal.com
> >>>>>>> wrote:
> >>>>>>>
> >>>>>>>> On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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-unsubscribe@tomcat.apache.org
> >>>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >> ---------------------------------------------------------------------
> >>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> ---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>
> >>>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Having trouble with common.loader

Posted by Daniel Mikusa <dm...@gopivotal.com>.
On Aug 22, 2013, at 9:21 AM, D C <dc...@gmail.com> wrote:

> Ok, here goes.  grep -v '/opt/jdk'

<snip>  Removing some of the fluff.

> Aug 21, 2013 5:08:03 PM org.apache.catalina.startup.HostConfig
> deployDescriptor
> INFO: Deploying configuration descriptor
> /opt/apache-tomcat-7.0.40/conf/Catalina/localhost/myApp.xml

Ok, myApp is deployed here...

> [Loaded org.springframework.web.SpringServletContainerInitializer from
> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
> [Loaded org.springframework.web.WebApplicationInitializer from
> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]

We can see that some of the Spring classes are being loaded from "WEB-INF/lib".  Were you expecting this?

> [Loaded org.springframework.web.context.ContextLoader from
> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
> [Loaded org.springframework.web.context.ContextLoaderListener from
> file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]

More Spring classes loaded from WEB-INF/ilb.  Again, were you expecting this?

> [Loaded com.myco.management.spring_utils.ContextLoaderListener from
> file:/web/webapps/myApp/WEB-INF/classes/com/myco/management/spring_utils/ContextLoaderListener.class]

Looks like one of your custom classes is being loaded.  No big deal.

> Aug 21, 2013 5:08:07 PM org.apache.catalina.core.ContainerBase
> addChildInternal
> SEVERE: ContainerBase.addChild: start:

App start fails...

> 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

Missing class is org.springframework.core.io.Resource.  Where is your spring-core-3.1.0.RELEASE.jar file?

Looking further...

> 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)

The stack trace seems to indicate that this error occurred while the container was scanning for annotations.  Is your application making use of Spring's WebApplicationInitializer functionality?  If not, you might want to disable it and see if the error goes away.

Dan

> 
> 
> On Thu, Aug 22, 2013 at 8:58 AM, Daniel Mikusa <dm...@gopivotal.com>wrote:
> 
>> On Aug 22, 2013, at 8:38 AM, D C <dc...@gmail.com> wrote:
>> 
>>> [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
>> 
>> Can you show the unaltered output?  If you want to filter out stuff to
>> make it smaller, filter out any classes that were loaded from the JDK.
>> 
>> Dan
>> 
>>> 
>>> 
>>> 
>>> Thanks,
>>> Dan
>>> 
>>> 
>>> On Thu, Aug 22, 2013 at 6:47 AM, Daniel Mikusa <dmikusa@gopivotal.com
>>> wrote:
>>> 
>>>> On Aug 21, 2013, at 5:09 PM, D C <dc...@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 <dmikusa@gopivotal.com
>>>>> wrote:
>>>>> 
>>>>>> On Aug 21, 2013, at 4:48 PM, D C <dc...@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 <
>> dmikusa@gopivotal.com
>>>>>>> wrote:
>>>>>>> 
>>>>>>>> On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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-unsubscribe@tomcat.apache.org
>>>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>>> 
>>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>> 
>>>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>> 
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Having trouble with common.loader

Posted by D C <dc...@gmail.com>.
Ok, here goes.  grep -v '/opt/jdk'

[Loaded org.apache.juli.ClassLoaderLogManager from
file:/opt/apache-tomcat-7.0.40/bin/tomcat-juli.jar]
[Loaded org.apache.juli.ClassLoaderLogManager$Cleaner from
file:/opt/apache-tomcat-7.0.40/bin/tomcat-juli.jar]
[Loaded org.apache.juli.ClassLoaderLogManager$RootLogger from
file:/opt/apache-tomcat-7.0.40/bin/tomcat-juli.jar]
[Loaded org.apache.juli.ClassLoaderLogManager$ClassLoaderLogInfo from
file:/opt/apache-tomcat-7.0.40/bin/tomcat-juli.jar]
[Loaded org.apache.juli.ClassLoaderLogManager$LogNode from
file:/opt/apache-tomcat-7.0.40/bin/tomcat-juli.jar]
[Loaded org.apache.juli.ClassLoaderLogManager$1 from
file:/opt/apache-tomcat-7.0.40/bin/tomcat-juli.jar]
[Loaded org.apache.juli.ClassLoaderLogManager$3 from
file:/opt/apache-tomcat-7.0.40/bin/tomcat-juli.jar]
[Loaded com.sun.jmx.remote.internal.PRef from __JVM_DefineClass__]
[Loaded com.sun.jmx.remote.protocol.iiop.ProxyStub from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedSerializationConstructorAccessor1 from
__JVM_DefineClass__]
[Loaded sun.reflect.GeneratedSerializationConstructorAccessor2 from
__JVM_DefineClass__]
[Loaded sun.reflect.GeneratedSerializationConstructorAccessor3 from
__JVM_DefineClass__]
[Loaded org.apache.catalina.startup.Bootstrap from
file:/opt/apache-tomcat-7.0.40/bin/bootstrap.jar]
[Loaded org.apache.juli.logging.LogFactory from
file:/opt/apache-tomcat-7.0.40/bin/tomcat-juli.jar]
[Loaded org.apache.juli.logging.Log from
file:/opt/apache-tomcat-7.0.40/bin/tomcat-juli.jar]
[Loaded org.apache.juli.logging.DirectJDKLog from
file:/opt/apache-tomcat-7.0.40/bin/tomcat-juli.jar]
[Loaded org.apache.catalina.startup.CatalinaProperties from
file:/opt/apache-tomcat-7.0.40/bin/bootstrap.jar]
[Loaded org.apache.catalina.startup.ClassLoaderFactory$Repository from
file:/opt/apache-tomcat-7.0.40/bin/bootstrap.jar]
[Loaded org.apache.catalina.startup.ClassLoaderFactory$RepositoryType from
file:/opt/apache-tomcat-7.0.40/bin/bootstrap.jar]
[Loaded org.apache.catalina.startup.ClassLoaderFactory from
file:/opt/apache-tomcat-7.0.40/bin/bootstrap.jar]
[Loaded org.apache.catalina.startup.ClassLoaderFactory$2 from
file:/opt/apache-tomcat-7.0.40/bin/bootstrap.jar]
[Loaded org.apache.catalina.loader.StandardClassLoaderMBean from
file:/opt/apache-tomcat-7.0.40/bin/bootstrap.jar]
[Loaded org.apache.catalina.loader.StandardClassLoader from
file:/opt/apache-tomcat-7.0.40/bin/bootstrap.jar]
[Loaded com.sun.proxy.$Proxy0 by instance of java.lang.reflect.Proxy]
[Loaded com.sun.proxy.$Proxy1 by instance of java.lang.reflect.Proxy]
[Loaded com.sun.proxy.$Proxy2 by instance of java.lang.reflect.Proxy]
[Loaded com.sun.proxy.$Proxy3 by instance of java.lang.reflect.Proxy]
[Loaded org.apache.catalina.security.SecurityClassLoad from
file:/opt/apache-tomcat-7.0.40/bin/bootstrap.jar]
[Loaded org.apache.catalina.startup.Catalina from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.LifecycleException from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.Catalina$CatalinaShutdownHook from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.LifecycleState from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.tomcat.util.digester.Rule from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.catalina.startup.ConnectorCreateRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.SetAllPropertiesRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.tomcat.util.digester.RuleSet from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.catalina.startup.SetParentClassLoaderRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.tomcat.util.log.SystemLogHandler from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.res.StringManager from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-util.jar]
[Loaded org.apache.juli.ClassLoaderLogManager$2 from
file:/opt/apache-tomcat-7.0.40/bin/tomcat-juli.jar]
[Loaded org.apache.catalina.security.SecurityConfig from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Lifecycle from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Server from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.tomcat.util.digester.Digester from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.digester.ObjectCreateRule from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.digester.SetPropertiesRule from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.digester.SetNextRule from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.digester.Rules from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.digester.CallMethodRule from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.digester.CallParamRule from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.digester.PathCallParamRule from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.digester.ObjectParamRule from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.digester.FactoryCreateRule from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.digester.SetRootRule from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.digester.SetPropertyRule from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.digester.SetTopRule from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.IntrospectionUtils$PropertySource from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.digester.Digester$SystemPropertySource from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.digester.ArrayStack from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.catalina.util.LifecycleBase from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.LifecycleMBeanBase from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.StandardServer from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.tomcat.util.digester.RulesBase from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.digester.RuleSetBase from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.catalina.startup.NamingRuleSet from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.SetNextNamingRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.EngineRuleSet from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.LifecycleListenerRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.RealmRuleSet from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.HostRuleSet from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.CopyParentClassLoaderRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.ContextRuleSet from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.SetContextPropertiesRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.ha.ClusterRuleSet from
file:/opt/apache-tomcat-7.0.40/lib/catalina-ha.jar]
[Loaded org.apache.tomcat.util.IntrospectionUtils from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.catalina.LifecycleListener from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.LifecycleSupport from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Service from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.NamingResources from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.Injectable from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.ResourceBase from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.ContextEnvironment from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.ContextResource from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.ContextResourceEnvRef from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.MessageDestinationRef from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Container from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.ContainerListener from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.NamingContextListener from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.ServiceRef from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.ResourceRef from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.ResourceEnvRef from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.EjbRef from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.ResourceLinkRef from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.TransactionRef from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Context from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.AprLifecycleListener from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.LifecycleEvent from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.JasperListener from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.JreMemoryLeakPreventionListener from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.mbeans.GlobalResourcesLifecycleListener from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.mbeans.MBeanUtils from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.tomcat.util.modeler.RegistryMBean from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.modeler.Registry from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.modeler.modules.ModelerSource from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded
org.apache.tomcat.util.modeler.modules.MbeansDescriptorsDigesterSource from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.modeler.ManagedBean from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.modeler.FeatureInfo from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.modeler.NotificationInfo from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.modeler.AttributeInfo from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.modeler.OperationInfo from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.modeler.BaseModelMBean from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.modeler.ParameterInfo from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded sun.reflect.GeneratedMethodAccessor1 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor2 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedConstructorAccessor1 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor3 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor4 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedConstructorAccessor2 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor5 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor6 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor7 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedConstructorAccessor3 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor8 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor9 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedConstructorAccessor4 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor10 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor11 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor12 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor13 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor14 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor15 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedMethodAccessor16 from __JVM_DefineClass__]
[Loaded org.apache.catalina.core.ThreadLocalLeakPreventionListener from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.StandardService from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.connector.Connector from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Executor from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.coyote.Adapter from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.http.mapper.Mapper from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.http.mapper.Mapper$MapElement from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.http.mapper.Mapper$Host from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.http.mapper.Mapper$Context from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.http.mapper.Mapper$ContextVersion from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.http.mapper.Mapper$Wrapper from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.catalina.connector.MapperListener from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.tomcat.jni.Library from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.jni.FileInfo from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.jni.Sockaddr from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
Aug 21, 2013 5:08:03 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.27 using APR
version 1.3.9.
Aug 21, 2013 5:08:03 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
[false], random [true].
[Loaded org.apache.coyote.ProtocolHandler from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.coyote.AbstractProtocol from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.coyote.http11.AbstractHttp11Protocol from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.coyote.http11.Http11AprProtocol from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.net.AbstractEndpoint from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.net.AprEndpoint from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.net.AbstractEndpoint$Handler from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.net.AprEndpoint$Handler from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.jni.Error from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.net.AbstractEndpoint$Acceptor from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.net.AprEndpoint$Acceptor from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.net.SocketProperties from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.net.AbstractEndpoint$BindState from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.threads.LimitLatch from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.threads.LimitLatch$Sync from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.coyote.AbstractProtocol$AbstractConnectionHandler from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler
from file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.coyote.Processor from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.coyote.ActionHook from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.coyote.AbstractProcessor from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.coyote.http11.AbstractHttp11Processor from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.coyote.http11.Http11AprProcessor from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.coyote.RequestGroupInfo from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.coyote.AbstractProtocol$RecycledProcessors from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded javax.servlet.ServletRequest from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded javax.servlet.http.HttpServletRequest from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.catalina.connector.Request from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.servlet.ServletResponse from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded javax.servlet.http.HttpServletResponse from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.catalina.connector.Response from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.tomcat.util.net.AprEndpoint$Poller from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.net.AprEndpoint$Sendfile from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.net.SocketStatus from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.net.SocketWrapper from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.catalina.Engine from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.ContainerBase from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.StandardEngine from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Pipeline from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.AccessLog from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Valve from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Realm from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Contained from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.StandardPipeline from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.valves.ValveBase from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.StandardEngineValve from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.servlet.ServletException from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.catalina.Loader from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Manager from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Cluster from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.EngineConfig from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Host from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.StandardHost from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.StandardHostValve from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.connector.ClientAbortException from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Globals from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.HostConfig from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.jasper.compiler.JspRuntimeContext from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded javax.servlet.jsp.JspFactory from
file:/opt/apache-tomcat-7.0.40/lib/jsp-api.jar]
[Loaded org.apache.jasper.runtime.JspFactoryImpl from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded javax.servlet.jsp.JspContext from
file:/opt/apache-tomcat-7.0.40/lib/jsp-api.jar]
[Loaded javax.servlet.jsp.PageContext from
file:/opt/apache-tomcat-7.0.40/lib/jsp-api.jar]
[Loaded org.apache.jasper.runtime.PageContextImpl from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded javax.servlet.jsp.JspEngineInfo from
file:/opt/apache-tomcat-7.0.40/lib/jsp-api.jar]
[Loaded org.apache.jasper.runtime.JspFactoryImpl$1 from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded javax.servlet.jsp.JspApplicationContext from
file:/opt/apache-tomcat-7.0.40/lib/jsp-api.jar]
[Loaded org.apache.jasper.security.SecurityClassLoad from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded sun.reflect.GeneratedConstructorAccessor5 from __JVM_DefineClass__]
[Loaded org.apache.tomcat.util.buf.StringCache from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded
org.apache.tomcat.util.modeler.modules.MbeansDescriptorsIntrospectionSource
from file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.buf.CharChunk from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.buf.ByteChunk from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.catalina.mbeans.MBeanFactory from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.StandardContext from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.mbeans.NamingResourcesMBean from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.ExtensionValidator from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.ManifestResource from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.Extension from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.mbeans.ServiceMBean from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.realm.RealmBase from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.realm.NullRealm from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.realm.X509UsernameRetriever from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.MD5Encoder from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.realm.RealmBase$AllRolesMode from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.ContainerBase$StartStopThreadFactory from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.mbeans.ContainerMBean from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.mbeans.ClassNameMBean from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.mbeans.ConnectorMBean from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.connector.CoyoteAdapter from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.servlet.SessionTrackingMode from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.catalina.comet.CometEvent from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.ServerInfo from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.URLEncoder from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
Aug 21, 2013 5:08:03 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
[Loaded org.apache.coyote.RequestInfo from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.coyote.Request from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.jni.Pool from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.jni.OS from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.jni.Address from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.jni.Socket from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
Aug 21, 2013 5:08:03 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1313 ms
[Loaded org.apache.naming.NamingContext from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.NameParserImpl from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.StringManager from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.ContextAccessController from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.ContextBindings from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.ContextResourceLink from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.ContextEjb from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.ContextService from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.factory.ResourceLinkFactory from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.java.javaURLContextFactory from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.SelectorContext from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.NamingContextBindingsEnumeration from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
Aug 21, 2013 5:08:03 PM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
Aug 21, 2013 5:08:03 PM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.40
[Loaded org.apache.catalina.Wrapper from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.SecurityConstraint from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.servlet.ServletInputStream from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.catalina.connector.CoyoteInputStream from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.connector.CoyoteReader from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.servlet.AsyncContext from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.tomcat.util.http.fileupload.FileUploadException from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded
org.apache.tomcat.util.http.fileupload.FileUploadBase$InvalidContentTypeException
from file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeException
from file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.http.fileupload.FileItemFactory from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.http.fileupload.RequestContext from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded javax.servlet.ServletOutputStream from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.catalina.connector.CoyoteOutputStream from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.connector.CoyoteWriter from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.realm.X509SubjectDnRetriever from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.ContainerBase$StartChild from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.valves.ErrorReportValve from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.ContextName from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.HostConfig$DeployDescriptor from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.HostConfig$DeployedApplication from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
Aug 21, 2013 5:08:03 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deploying configuration descriptor
/opt/apache-tomcat-7.0.40/conf/Catalina/localhost/myApp.xml
[Loaded javax.servlet.descriptor.JspConfigDescriptor from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.tomcat.InstanceManager from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-api.jar]
[Loaded org.apache.tomcat.JarScanner from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-api.jar]
[Loaded javax.servlet.Registration from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded javax.servlet.ServletRegistration from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded javax.servlet.Registration$Dynamic from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded javax.servlet.ServletRegistration$Dynamic from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.catalina.deploy.ApplicationParameter from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.StandardContext$ContextFilterMaps from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.FilterMap from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.servlet.ServletConfig from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.catalina.core.StandardWrapper from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.ApplicationJspConfigDescriptor from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.StandardContextValve from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.ContextConfig from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.tomcat.JarScannerCallback from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-api.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ClassFormatException from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.catalina.deploy.LoginConfig from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.RequestUtil from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.StandardHost$MemoryLeakTrackingListener
from file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.mbeans.ContextMBean from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.TldConfig from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.XmlErrorHandler from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.CharsetMapper from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Authenticator from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.ErrorPage from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.FilterDef from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.servlet.ServletContext from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded javax.servlet.ServletContainerInitializer from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.catalina.core.ApplicationServletRegistration from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.servlet.HttpConstraintElement from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded javax.servlet.ServletSecurityElement from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.catalina.deploy.MessageDestination from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.servlet.Servlet from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded javax.servlet.FilterConfig from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.catalina.deploy.ContextLocalEjb from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.ContextTransaction from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded sun.reflect.GeneratedMethodAccessor17 from __JVM_DefineClass__]
[Loaded org.apache.catalina.startup.WebRuleSet from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.MappedNameRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.ServiceQnameRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.CallMethodMultiRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.CallParamMultiRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.SoapHeaderRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.SetPublicIdRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.IgnoreAnnotationsRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.VersionRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.AbsoluteOrderingRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.RelativeOrderingRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.NameRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.SetDistributableRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.SetJspConfig from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.SetLoginConfig from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.SetAuthConstraintRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.ServletDefCreateRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.SetSessionConfig from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.TaglibLocationRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.LifecycleCallbackRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.DigesterFactory from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.SchemaResolver from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.TldRuleSet from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.TaglibRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.TaglibUriRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.TaglibListenerRule from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.mbeans.ContextResourceMBean from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.resources.BaseDirContext from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.resources.FileDirContext from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.resources.WARDirContext from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.resources.ProxyDirContext from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.resources.ImmutableNameNotFoundException from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.resources.ResourceCache from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.resources.CacheEntry from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.loader.WebappLoader from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.loader.WebappClassLoader from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.ApplicationContext from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.servlet.RequestDispatcher from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded javax.servlet.FilterRegistration from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded javax.servlet.SessionCookieConfig from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.naming.resources.DirContextURLStreamHandler from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.servlet.FilterRegistration$Dynamic from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.catalina.core.ApplicationContextFacade from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.ApplicationSessionCookieConfig from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.tomcat.util.http.RequestUtil from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.naming.resources.Resource from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.resources.FileDirContext$FileResource from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.NamingEntry from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.resources.ResourceAttributes from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.resources.FileDirContext$FileResourceAttributes
from file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.resources.DirContextURLConnection from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.resources.DirContextURLStreamHandlerFactory from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.JndiPermission from
file:/opt/apache-tomcat-7.0.40/bin/bootstrap.jar]
[Loaded org.apache.catalina.loader.WebappClassLoader$1 from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.security.SecurityUtil from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.servlet.UnavailableException from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.naming.NamingContextEnumeration from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.el.Expression from
file:/opt/apache-tomcat-7.0.40/lib/el-api.jar]
[Loaded org.apache.catalina.deploy.WebXml from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.SessionConfig from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.ServletDef from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.JspPropertyGroup from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.SecurityRoleRef from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.deploy.MultipartDef from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded sun.reflect.GeneratedMethodAccessor18 from __JVM_DefineClass__]
[Loaded org.apache.catalina.startup.ContextConfig$DefaultWebXmlCacheEntry
from file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.tomcat.util.scan.StandardJarScanner from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-util.jar]
[Loaded
org.apache.catalina.startup.ContextConfig$FragmentJarScannerCallback from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.tomcat.util.file.Matcher from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-util.jar]
[Loaded org.apache.catalina.util.ResourceSet from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.tomcat.util.scan.JarFactory from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-util.jar]
[Loaded org.apache.tomcat.util.scan.Jar from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-util.jar]
[Loaded org.apache.tomcat.util.scan.FileUrlJar from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-util.jar]
[Loaded org.apache.catalina.loader.ResourceEntry from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.springframework.web.SpringServletContainerInitializer from
file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
[Loaded javax.servlet.annotation.HandlesTypes from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.springframework.web.WebApplicationInitializer from
file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
[Loaded com.sun.proxy.$Proxy4 from
org.apache.catalina.loader.StandardClassLoader]
[Loaded org.apache.tomcat.util.bcel.classfile.ClassParser from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantPool from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.Constant from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantClass from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantCP from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantFieldref from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantMethodref from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantInterfaceMethodref
from file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantString from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantInteger from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantFloat from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantLong from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantDouble from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantNameAndType from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantUtf8 from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantMethodHandle from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantMethodType from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantInvokeDynamic from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.util.BCELComparator from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.Constant$1 from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.AccessFlags from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.FieldOrMethod from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.Field from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.Field$1 from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.Attribute from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.Method from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.Method$1 from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.Unknown from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ConstantValue from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.SourceFile from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.Code from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ExceptionTable from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.LineNumberTable from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.LocalVariableTable from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.InnerClasses from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.Synthetic from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.Deprecated from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.PMGClass from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.Signature from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.StackMap from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.Annotations from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.RuntimeVisibleAnnotations
from file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.RuntimeInvisibleAnnotations
from file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ParameterAnnotations from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded
org.apache.tomcat.util.bcel.classfile.RuntimeVisibleParameterAnnotations
from file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded
org.apache.tomcat.util.bcel.classfile.RuntimeInvisibleParameterAnnotations
from file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.AnnotationDefault from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.LocalVariableTypeTable from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.EnclosingMethod from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.StackMapTable from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.Constants from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.CodeException from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.LineNumber from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.LocalVariable from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.JavaClass from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.JavaClass$1 from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.Utility from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.Utility$1 from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.catalina.startup.ContextConfig$JavaClassCacheEntry from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.StackMapTableEntry from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.StackMapType from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.AnnotationEntry from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.InnerClass from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ElementValuePair from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ElementValue from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.SimpleElementValue from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.EnumElementValue from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ClassElementValue from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.AnnotationElementValue from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.bcel.classfile.ArrayElementValue from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.buf.UDecoder from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.buf.UDecoder$DecodeException from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.buf.UEncoder from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.naming.Constants from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.naming.resources.RecyclableNamingEnumeration from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.StandardWrapperFacade from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.InstanceSupport from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.InstanceListener from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.StandardWrapperValve from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.tomcat.util.modeler.Util from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.catalina.startup.WebAnnotationSet from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.Introspection from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.servlet.ServletContextListener from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.springframework.web.context.ContextLoader from
file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
[Loaded org.springframework.web.context.ContextLoaderListener from
file:/web/webapps/myApp/WEB-INF/lib/spring-web-3.1.0.RELEASE.jar]
[Loaded com.myco.management.spring_utils.ContextLoaderListener from
file:/web/webapps/myApp/WEB-INF/classes/com/myco/management/spring_utils/ContextLoaderListener.class]
[Loaded javax.annotation.security.DeclareRoles from
file:/opt/apache-tomcat-7.0.40/lib/annotations-api.jar]
[Loaded org.apache.tomcat.util.ExceptionUtils from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
Aug 21, 2013 5:08:07 PM org.apache.catalina.core.ContainerBase
addChildInternal
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

Aug 21, 2013 5:08:07 PM org.apache.catalina.startup.HostConfig
deployDescriptor
SEVERE: Error deploying configuration descriptor
/opt/apache-tomcat-7.0.40/conf/Catalina/localhost/myApp.xml
java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myApp]]
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
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)

[Loaded org.apache.catalina.startup.HostConfig$DeployDirectory from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
Aug 21, 2013 5:08:07 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory /web/webapps/ROOT
[Loaded javax.servlet.GenericServlet from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded javax.servlet.http.HttpServlet from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.catalina.servlets.DefaultServlet from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.servlets.DefaultServlet$Range from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.annotation.security.RunAs from
file:/opt/apache-tomcat-7.0.40/lib/annotations-api.jar]
[Loaded org.apache.tomcat.PeriodicEventListener from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-api.jar]
[Loaded org.apache.jasper.servlet.JspServlet from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded org.apache.jasper.Options from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded org.apache.catalina.authenticator.AuthenticatorBase from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.authenticator.NonLoginAuthenticator from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.startup.TldConfig$TldJarScannerCallback from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.SessionListener from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.authenticator.SingleSignOn from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.SessionIdGenerator from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.session.ManagerBase from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.session.StandardManager from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.session.TooManyActiveSessionsException from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.Session from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.util.CustomObjectInputStream from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded org.apache.catalina.core.DefaultInstanceManager from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded
org.apache.catalina.core.DefaultInstanceManager$AnnotationCacheEntry from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.servlet.ServletContextEvent from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded javax.servlet.Filter from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.catalina.ContainerServlet from
file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
[Loaded javax.ejb.EJB from
file:/opt/apache-tomcat-7.0.40/lib/annotations-api.jar]
[Loaded javax.persistence.PersistenceContext from
file:/opt/apache-tomcat-7.0.40/lib/annotations-api.jar]
[Loaded javax.persistence.PersistenceUnit from
file:/opt/apache-tomcat-7.0.40/lib/annotations-api.jar]
[Loaded javax.servlet.annotation.MultipartConfig from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded javax.servlet.annotation.ServletSecurity from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded javax.servlet.SingleThreadModel from
file:/opt/apache-tomcat-7.0.40/lib/servlet-api.jar]
[Loaded org.apache.jasper.EmbeddedServletOptions from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded org.apache.jasper.compiler.TldLocationsCache from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded org.apache.jasper.JasperException from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded org.apache.jasper.compiler.JspConfig from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded org.apache.jasper.compiler.TagPluginManager from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded org.apache.jasper.compiler.tagplugin.TagPluginContext from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded org.apache.jasper.compiler.Node$Visitor from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded org.apache.jasper.compiler.TagPluginManager$1 from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded org.apache.jasper.Constants from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded org.apache.jasper.servlet.JspCServletContext from
file:/opt/apache-tomcat-7.0.40/lib/jasper.jar]
[Loaded org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor
from file:/opt/apache-tomcat-7.0.40/lib/catalina.jar]
Aug 21, 2013 5:08:07 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
[Loaded org.apache.tomcat.util.threads.TaskQueue from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.threads.TaskThreadFactory from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.threads.TaskThread from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.threads.ThreadPoolExecutor from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.threads.ThreadPoolExecutor$RejectHandler
from file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.jni.Poll from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.net.AbstractEndpoint$Acceptor$AcceptorState
from file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.net.AprEndpoint$AsyncTimeout from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
[Loaded org.apache.tomcat.util.http.mapper.Mapper$ContextList from
file:/opt/apache-tomcat-7.0.40/lib/tomcat-coyote.jar]
Aug 21, 2013 5:08:07 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3564 ms



Thanks,
Dan


On Thu, Aug 22, 2013 at 8:58 AM, Daniel Mikusa <dm...@gopivotal.com>wrote:

> On Aug 22, 2013, at 8:38 AM, D C <dc...@gmail.com> wrote:
>
> > [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
>
> Can you show the unaltered output?  If you want to filter out stuff to
> make it smaller, filter out any classes that were loaded from the JDK.
>
> Dan
>
> >
> >
> >
> > Thanks,
> > Dan
> >
> >
> > On Thu, Aug 22, 2013 at 6:47 AM, Daniel Mikusa <dmikusa@gopivotal.com
> >wrote:
> >
> >> On Aug 21, 2013, at 5:09 PM, D C <dc...@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 <dmikusa@gopivotal.com
> >>> wrote:
> >>>
> >>>> On Aug 21, 2013, at 4:48 PM, D C <dc...@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 <
> dmikusa@gopivotal.com
> >>>>> wrote:
> >>>>>
> >>>>>> On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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-unsubscribe@tomcat.apache.org
> >>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> ---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>
> >>>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Having trouble with common.loader

Posted by Daniel Mikusa <dm...@gopivotal.com>.
On Aug 22, 2013, at 8:38 AM, D C <dc...@gmail.com> wrote:

> [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

Can you show the unaltered output?  If you want to filter out stuff to make it smaller, filter out any classes that were loaded from the JDK.

Dan

> 
> 
> 
> Thanks,
> Dan
> 
> 
> On Thu, Aug 22, 2013 at 6:47 AM, Daniel Mikusa <dm...@gopivotal.com>wrote:
> 
>> On Aug 21, 2013, at 5:09 PM, D C <dc...@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 <dmikusa@gopivotal.com
>>> wrote:
>>> 
>>>> On Aug 21, 2013, at 4:48 PM, D C <dc...@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 <dmikusa@gopivotal.com
>>>>> wrote:
>>>>> 
>>>>>> On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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-unsubscribe@tomcat.apache.org
>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>> 
>>>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>> 
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Having trouble with common.loader

Posted by D C <dc...@gmail.com>.
[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 <dm...@gopivotal.com>wrote:

> On Aug 21, 2013, at 5:09 PM, D C <dc...@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 <dmikusa@gopivotal.com
> >wrote:
> >
> >> On Aug 21, 2013, at 4:48 PM, D C <dc...@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 <dmikusa@gopivotal.com
> >>> wrote:
> >>>
> >>>> On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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-unsubscribe@tomcat.apache.org
> >>>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>
> >>>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Having trouble with common.loader

Posted by Daniel Mikusa <dm...@gopivotal.com>.
On Aug 21, 2013, at 5:09 PM, D C <dc...@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 <dm...@gopivotal.com>wrote:
> 
>> On Aug 21, 2013, at 4:48 PM, D C <dc...@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 <dmikusa@gopivotal.com
>>> wrote:
>>> 
>>>> On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>> 
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Having trouble with common.loader

Posted by D C <dc...@gmail.com>.
I added verbose,  it does not appear to attempt to load anything from
/web/lib/
​
for permissions i verified that i could read the files as the tomcat user.​
​


Thanks,
Dan


On Wed, Aug 21, 2013 at 5:01 PM, Daniel Mikusa <dm...@gopivotal.com>wrote:

> On Aug 21, 2013, at 4:48 PM, D C <dc...@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 <dmikusa@gopivotal.com
> >wrote:
> >
> >> On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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-unsubscribe@tomcat.apache.org
> >>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Having trouble with common.loader

Posted by Daniel Mikusa <dm...@gopivotal.com>.
On Aug 21, 2013, at 4:48 PM, D C <dc...@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 <dm...@gopivotal.com>wrote:
> 
>> On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Having trouble with common.loader

Posted by D C <dc...@gmail.com>.
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?






Thanks,
Dan


On Wed, Aug 21, 2013 at 4:27 PM, Daniel Mikusa <dm...@gopivotal.com>wrote:

> On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Having trouble with common.loader

Posted by Michael-O <19...@gmx.net>.
Am 2013-08-22 21:40, schrieb Caldarale, Charles R:
>> From: Michael-O [mailto:1983-01-06@gmx.net]
>> Subject: Re: Having trouble with common.loader
>
>>> 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
>
>> Very decent tip for this loader. Does the Javadoc warning
>
>> "This is not meant to be used for production. Its meant to ease
>> development with IDE's without the need for fully republishing jars in
>> WEB-INF/lib"
>
>> still count?
>
> No.  That statement was removed from the doc:
>
> http://tomcat.apache.org/tomcat-7.0-doc/config/loader.html
>
> and the Javadoc some time ago.  Use the current information.

True, it's gone for Tomcat 7. One (I) should file a ticket for that.

Thanks,

Michael


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Having trouble with common.loader

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Michael-O [mailto:1983-01-06@gmx.net] 
> Subject: Re: Having trouble with common.loader

> > 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

> Very decent tip for this loader. Does the Javadoc warning

> "This is not meant to be used for production. Its meant to ease 
> development with IDE's without the need for fully republishing jars in 
> WEB-INF/lib"

> still count?

No.  That statement was removed from the doc:

http://tomcat.apache.org/tomcat-7.0-doc/config/loader.html

and the Javadoc some time ago.  Use the current information.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Having trouble with common.loader

Posted by Michael-O <19...@gmx.net>.
Am 2013-08-22 17:48, schrieb Konstantin Kolinko:
> 2013/8/22 Daniel Mikusa <dm...@gopivotal.com>:
>> On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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

Very decent tip for this loader. Does the Javadoc warning

"This is not meant to be used for production. Its meant to ease 
development with IDE's without the need for fully republishing jars in 
WEB-INF/lib"

still count?

Michael



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Having trouble with common.loader

Posted by D C <dc...@gmail.com>.
Thank you all for your help.  I figured out what the problem was.
I accidentally made logging.properties and catalina.properties owned by
root:root with 640 permissions.  Changed to root:tomcat, and everything
worked right away.

Re: Having trouble with common.loader

Posted by D C <dc...@gmail.com>.
On Thu, Aug 22, 2013 at 2:51 PM, Konstantin Kolinko
<kn...@gmail.com>wrote:

> 2013/8/22 D C <dc...@gmail.com>:
> > On Thu, Aug 22, 2013 at 11:48 AM, Konstantin Kolinko <
> knst.kolinko@gmail.com
> >> wrote:
> >
> >> 2013/8/22 Daniel Mikusa <dm...@gopivotal.com>:
> >> > On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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/
>

# su - tomcat -s /bin/bash
-bash-4.1$ ls /web/lib/
adcenter_live_base-20070831.jar  c3p0-0.9.1.jar
commons-httpclient-3.0.1.jar  jakarta-oro-2.0.8.jar
 spring-beans-3.1.0.RELEASE.jar       wsdl4j-1.5.1.jar
amqp-client-2.8.0.jar            commons-beanutils-1.7.0.jar
 commons-lang-2.4.jar          jaxrpc-api-1.1.jar
spring-context-3.1.0.RELEASE.jar     xml-apis-1.0.b2.jar
aopalliance-1.0.jar              commons-codec-1.3.jar
 commons-logging-1.0.4.jar     log4j-1.2.16.jar
spring-core-3.1.0.RELEASE.jar
Ask-3.0.jar                      commons-collections-2.1.jar
 commons-math3-3.0.jar         memcached-client-20120227.jar
 spring-expression-3.1.0.RELEASE.jar
axis-1.3.jar                     commons-dbcp-1.2.2.jar
commons-pool-1.3.jar          mysql-connector-java-5.1.10.jar
 spring-jdbc-3.1.0.RELEASE.jar
axis-jaxrpc-1.3.jar              commons-digester-1.6.jar
commons-validator-1.3.1.jar   spring-aop-3.1.0.RELEASE.jar
spring-tx-3.1.0.RELEASE.jar
axis-saaj-1.3.jar                commons-discovery-0.2.jar
 geoApi-20080422.jar           spring-asm-3.1.0.RELEASE.jar
spring-web-3.1.0.RELEASE.jar



>
>
> > /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?
>

7.0.40 and ​7.0.42​
For the sake of testing, i'll stick to 7.0.42.



>
> Do you know how configure Tomcat with separate $CATALINA_BASE and
> $CATALINA_HOME?
>

I didn't specifically do that. This is what i did:
server.xml:
    <Host name="localhost"  appBase="/web/webapps"

logging.properties:
replaced all instances of "${catalina.base}/logs" with "/web/logs".
- this actually didn't work. but im not dwelling on it right now.​​



> Do they have the same value for you, or different ones? (As printed by
> catalina.sh just before Tomcat starts).
>

Using CATALINA_BASE:   /tomcat
Using CATALINA_HOME:   /tomcat



>
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Having trouble with common.loader

Posted by Konstantin Kolinko <kn...@gmail.com>.
2013/8/22 D C <dc...@gmail.com>:
> On Thu, Aug 22, 2013 at 11:48 AM, Konstantin Kolinko <knst.kolinko@gmail.com
>> wrote:
>
>> 2013/8/22 Daniel Mikusa <dm...@gopivotal.com>:
>> > On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Having trouble with common.loader

Posted by D C <dc...@gmail.com>.
On Thu, Aug 22, 2013 at 11:48 AM, Konstantin Kolinko <knst.kolinko@gmail.com
> wrote:

> 2013/8/22 Daniel Mikusa <dm...@gopivotal.com>:
> > On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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"/>

<Resource
   factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
...
​



>
>
>
> 2. Top-posting is bad,
> per rules of this mailing list,
> http://tomcat.apache.org/lists.html#tomcat-users
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Having trouble with common.loader

Posted by Konstantin Kolinko <kn...@gmail.com>.
2013/8/22 Daniel Mikusa <dm...@gopivotal.com>:
> On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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


2. Top-posting is bad,
per rules of this mailing list,
http://tomcat.apache.org/lists.html#tomcat-users

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Having trouble with common.loader

Posted by Daniel Mikusa <dm...@gopivotal.com>.
On Aug 21, 2013, at 4:33 PM, David kerber <dc...@verizon.net> wrote:

> On 8/21/2013 4:27 PM, Daniel Mikusa wrote:
>> On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Having trouble with common.loader

Posted by David kerber <dc...@verizon.net>.
On 8/21/2013 4:27 PM, Daniel Mikusa wrote:
> On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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.


>
> 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-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Having trouble with common.loader

Posted by Daniel Mikusa <dm...@gopivotal.com>.
On Aug 21, 2013, at 4:09 PM, David kerber <dc...@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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Having trouble with common.loader

Posted by David kerber <dc...@verizon.net>.
Basically you're trying to defeat the way the system is designed to 
work.  Don't do that...


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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org