Large webapps in 7.0.29 and Annotation Scanning not respecting metadata-complete

2012-07-31 Thread andreas palsson

Good morning.

After upgrading to 7.0.29, one of my larger webapps could no longer be deployed 
due to OutOfMemoryError.
As far as I know, this is related to the new feature of annotation scanning 
which was enabled in v7.0.29 (see the stack trace below).

Have anyone else experienced the same issue?


This new behaviour can supposedly be turned off by setting 
'metadata-complete=true' in 'web.xml', however that seems not be working as 
intended. Temporarily I can solve it by increasing memory for 7.0.29, but to me 
this is still a bug considering it works fine in 7.0.28. :)


Following is the stack trace, system, java version, command line, the list of 
JAR-files from /lib and head of 'web.xml'.

Thanks.


SEVERE: Error waiting for multi-thread deployment of WAR files to complete
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap 
space
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at 
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:752)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1413)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at 
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401)
at 
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:346)
at 
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1140)
at 
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:785)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
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:1110)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.io.DataInputStream.readUTF(DataInputStream.java:661)
at java.io.DataInputStream.readUTF(DataInputStream.java:564)
at 
org.apache.tomcat.util.bcel.classfile.ConstantUtf8.init(ConstantUtf8.java:48)
at 
org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:129)
at 
org.apache.tomcat.util.bcel.classfile.ConstantPool.init(ConstantPool.java:60)
at 
org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:209)
at 
org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:119)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2066)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1942)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1908)
at 
org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1893)
at 
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1296)
at 
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:855)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:346)
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:5173)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
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:618)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:963)
at 
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1600)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
... 5 more


Linux mybox 3.4.6-2.fc17.i686 #1 SMP Thu Jul 19 22:15:33 UTC 2012 i686 i686 
i386 GNU/Linux



java version 1.7.0_05
Java(TM) SE Runtime Environment (build 

RE: Large webapps in 7.0.29 and Annotation Scanning not respecting metadata-complete

2012-08-01 Thread andreas palsson

Thank you Mark for explaining this.
I'll see if I can get my hands on a 7.0.30 and see how it works out.
 
One thing though, would it be possible to allow Tomcat to _only_ scan for SCI's 
in WEB-INF/classes and exclude WEB-INF/lib (even for parent classes inherited 
in the former)?
It would be great to have some control over the SCI's as some could be located 
in any of the dependencies I have added to the application.

// andreas 

 
 

 Date: Wed, 1 Aug 2012 08:51:04 +0100
 From: ma...@apache.org
 To: users@tomcat.apache.org
 Subject: Re: Large webapps in 7.0.29 and Annotation Scanning not respecting 
 metadata-complete
 
 There are multiple issues going on here. There have been reported
 previously and are understood. I'll try and explain the full story.
 
[...]
 
 Mark