I am currently working on a Dynamic Web Project for school and I am running into a weird problem... I am trying to run a servlet from a .jsp file. I did a lot of research and apparently (please correct me if I'm wrong!) you need to place the compiled servlet or java class files into WEB-INF/classes directory if you want to use them within the .jsp file.
Before setting the build path to be this directory or even creating the directory, I was able to run my web app. The second I made the change to the build path, my server refused to start and I am now getting this error:
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/PullUp]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:915)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/PullUp]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
... 6 more
Caused by: java.lang.IllegalArgumentException: The servlets named [ListingServlet] and [com.pullup.ListingServlet] are both mapped to the url-pattern [/ListingServlet] which is not permitted
at org.apache.tomcat.util.descriptor.web.WebXml.addServletMappingDecoded(WebXml.java:316)
at org.apache.tomcat.util.descriptor.web.WebXml.addServletMapping(WebXml.java:309)
at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2384)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2066)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1951)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1945)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1945)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1156)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:783)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:307)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5213)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 6 more
Does anyone have any ideas on how to fix this? Any help would be greatly appreciated!
You are getting both mapped to the url-pattern exception because when Tomcat is trying to load the servlet classes, it has found 2 mappings for the same servlet i.e., one from web.xml and another from #webservlet.
#webservlet is an alternative way (in JavaEE6 containers) to define the servlet url mapping (inline to the servlet source code). So you should NOT add those servlets and mapping into the web.xml (i.e., just remove the web.xml from WEB-INF folder).
Related
I am deploying a web application and getting following exception when try to deploy through tomcat 9.
I am getting below exception in tomcat while deployment FAIL - Application at context path [/webCenter-EN-Entitlement] could not be started FAIL - Encountered exception [org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot#299321e2]]
In Tomcat Log files found following exception. Please help with any solution. Your help is appreciated in advance.
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot#2d1dee39]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4830)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4966)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
... 37 more
Caused by: java.lang.IllegalArgumentException: The main resource set specified [H:\XXXXXX] is not valid
at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:751)
at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:708)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 41 more
Issue is resolved. Folder which contains my web application was not have necessary permission to the account which was used to Run Tomcat Service.
I have an error which is already getting me crazy.
It's a Liferay 6.1 with Tomcat and we are talking about the preproduction environment. A portlet is deployed but it fails in the deployment phase. This is the error:
After this error, I see a message saying the portlet has been undeployed.
We have tried to deploy another .war which was working before but the error continues. This error only appears in the preproducction environtmet because in integration and production environtmets it is correctly working.
I have tried the next stepts:
- Stop server
- Delete temp folder
- Delete work
- Delete the portlet from webbapp
- Start server
- Check file permissions
- Check dependencies/libs with other struts portlet which is correctly working.
And nothing, as soon as the portlet is deployed (with a version that previously worked), the same error appears.
The portlet makes use of struts and I have also tried putting the library inside the portlet. But it is still the same.
Any idea?
This is the error:
17:37:58,240 INFO [localhost-startStop-2][HotDeployImpl:178] Deploying qui-es-qui-portlet from queue
17:37:58,241 INFO [localhost-startStop-2][PluginPackageUtil:1033] Reading plugin package for qui-es-qui-portlet
17:37:58,451 WARN [localhost-startStop-2][PortletLocalServiceImpl:1145] Duplicate struts path qui-es-qui
17:37:58,453 ERROR [localhost-startStop-2][PortletBagFactory:123] java.lang.ClassNotFoundException: com.liferay.portlet.StrutsPortlet
java.lang.ClassNotFoundException: com.liferay.portlet.StrutsPortlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:120)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:546)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:321)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:120)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:188)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:141)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:64)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:56)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
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:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:724)
My issue si very onclear, as i'm copying and pasting a project which works in liferay (a test portlet), i'm renaming the portlet in the various files needed and i'm trying to deploy it. It Throws a NullPointer and i cannot really see why. Below is the error:
GRAVE: Exception sending context destroyed event to listener instance of class com.liferay.portal.kernel.servlet.SecurePluginContextListener
java.lang.ExceptionInInitializerError
at com.liferay.portal.kernel.deploy.hot.HotDeployEvent.initDependentServletContextNames(HotDeployEvent.java:97)
at com.liferay.portal.kernel.deploy.hot.HotDeployEvent.<init>(HotDeployEvent.java:53)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireUndeployEvent(PluginContextListener.java:170)
at com.liferay.portal.kernel.servlet.SecurePluginContextListener.fireUndeployEvent(SecurePluginContextListener.java:294)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalDestroy(PluginContextListener.java:132)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalDestroy(BasePortalLifecycle.java:31)
at com.liferay.portal.kernel.servlet.PluginContextListener.contextDestroyed(PluginContextListener.java:97)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5063)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5723)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1028)
at org.apache.catalina.startup.HostConfig.undeploy(HostConfig.java:1547)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1453)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1695)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:333)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1546)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1524)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.liferay.portal.kernel.util.PropsUtil.get(PropsUtil.java:32)
at com.liferay.portal.kernel.deploy.hot.DependencyManagementThreadLocal.<clinit>(DependencyManagementThreadLocal.java:40)
... 22 more
I'am deploying through the deploy directory of liferay's tomcat.
This is not a question about nullpointer exception but on portlet deployment in liferay.
It's likely a Portlet configuration prolem since you renamed the Portlet files. Can you give us the content of Portlet.xml and Liferay-portlet.xml please ?
I have a jar called framework.jar. I'm renaming it to framework.zip, decompiling one of its class files, modifing it, and putting it back in to the zip and renaming it back to framework.jar.
While I do this without making any modifications to any of the .class files, my tomcat runs fine. However, with my modifications, I get a Lifecycle exception.
Note that I took the corresponding latest compiled .class file from eclipse and replaced the same .class file file.
update:
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngin
e[Catalina].StandardHost[localhost].StandardContext[/enovia]]
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:87
7)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
a:1120)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig
.java:1678)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:51
1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.tomee.catalina.TomEERuntimeException: org.apache.openejb.O
penEJBException: Unable to create annotation scanner for web module enovia: null
at org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatW
ebAppBuilder.java:2049)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWeb
AppBuilder.java:1091)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWe
bAppBuilder.java:1051)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(Global
ListenerSupport.java:127)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
se.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5322)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 more
Caused by: org.apache.openejb.OpenEJBException: Unable to create annotation scan
ner for web module enovia: null
at org.apache.openejb.config.DeploymentLoader.addWebModule(DeploymentLoa
der.java:838)
at org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java
:219)
at org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatW
ebAppBuilder.java:2047)
... 17 more
Caused by: java.lang.IllegalArgumentException
at org.apache.xbean.asm4.ClassReader.<init>(Unknown Source)
at org.apache.xbean.asm4.ClassReader.<init>(Unknown Source)
at org.apache.xbean.asm4.ClassReader.<init>(Unknown Source)
at org.apache.xbean.finder.AnnotationFinder.readClassDef(AnnotationFinde
r.java:1120)
at org.apache.xbean.finder.AnnotationFinder.<init>(AnnotationFinder.java
:139)
at org.apache.xbean.finder.AnnotationFinder.<init>(AnnotationFinder.java
:152)
at org.apache.xbean.finder.AsynchronousInheritanceAnnotationFinder.<init
>(AsynchronousInheritanceAnnotationFinder.java:43)
at org.apache.openejb.config.FinderFactory.newFinder(FinderFactory.java:
114)
at org.apache.openejb.config.FinderFactory.create(FinderFactory.java:68)
at org.apache.openejb.config.FinderFactory.createFinder(FinderFactory.ja
va:57)
at org.apache.openejb.config.DeploymentLoader.addWebModule(DeploymentLoa
der.java:830)
... 19 more
May 13, 2015 9:14:52 PM org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory D:\16x_tomcat\apache-tomee-plu
s-1.6.0\webapps\enovia
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catal
ina.LifecycleException: Failed to start component [StandardEngine[Catalina].Stan
dardHost[localhost].StandardContext[/enovia]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:904)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:87
7)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
a:1120)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig
.java:1678)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:51
1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
at java.lang.Thread.run(Thread.java:745)
update 2:
As greg-449's comment pointed out, the issue was because I was using a java 8 compiler. And that jar was built on a java 7 compiler.
Tomcat: LifecycleException when deploying
Based on the post referenced above you might be missing some start up, note that there should be a log file for a more detailed error report.
Also the legally behind editing pre-compiled jar files...
In almost all cases it is illegal to redistribute work. So therefore if you redistributed in most cases it would not be legal but you really need to check the copyright.
One way to get around it... shhh I didn't tell you this, is to make the user download the jar legally and have them modify it. Normally this is done by giving them a program to do so. And almost all the time the program involves Byte code, so you should use ASM or BCEL. This will shift the legal implications from you to the user. Therefore the user will be violating the terms of user agreement.
For example I used to be apart of the development team for a runescape bot, They used java so we had the user download the jar from the game as they needed anyway and before running it we would inject listeners in the jar. Using BCEL or Reflection
I try to deploy a war into Tomcat 7.0.29. I'm having the following log stack :
GRAVE: Error waiting for multi-thread deployment of context descriptors to complete
java.util.concurrent.ExecutionException: java.lang.StackOverflowError
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:574)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
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:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.StackOverflowError
at java.util.HashSet.<init>(HashSet.java:86)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2208)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2227)
(Many stack frames ommited...)
Does anybody face the same problem ?
This is reported upstream as issue #53871 in Tomcat. The problem appears to be with annotation scanning, and Tomcat 7.0.38 includes a clearer error message.
From the bug report:
Due to dependency management problems I deployed a WAR file containing two JAR files containing different versions of a library, where version 1 contained a class A which inherited from B and another version 2 which contained a class B inheriting from A.
The classes were loaded in such an order that A and B cyclically inherited from each other which leads to a stack overflow in populateSCIsForCacheEntry because it does not detect cycles in the inheritance tree.
This was exactly the problem in my case: an old version of dom4j bundled an incompatible version of jaxen. The new error diagnostic in 7.0.38 showed exactly which classes formed a loop and I fixed it by upgrading those dependencies.
I'm also encountering this issue in Tomcat 7.0.29 and Tomcat 7.0.30. However with Tomcat 7.0.28 everything works fine, so I suspect it's Tomcat issue, that was recently introduced.
The error encountered in 7.0.29 and 7.0.30, when starting Tomcat and deploying a war file:
14:01:06,380 ERROR [HostConfig:576] Error waiting for multi-thread deployment of context descriptors to complete java.util.concurrent.ExecutionException: java.lang.StackOverflowError
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.deployDescriptors(HostConfig.java:574)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
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.StackOverflowError
at java.util.HashSet.<init>(HashSet.java:103)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2243)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2260)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2260)
For me this behavior reproduced in IntelliJ Idea when I set the Application Context to the same name as the the Maven atrifactId in the .pom file.
E.g. my artifactId is 'test', then I set the Application Context (Edit configuration -> Tomcat Server -> Deployment, select the exploded artifact) to '/test'. As soon as I changed the Application Context, everything worked.
I had the same problem. I think it was caused by Tomcat 7, so when I changed to Tomcat 6.0.35, the problem resolved itself like a charm.
Use a lower version of Tomcat. There are problems with the version of Tomcat you are using.
A workaround : I changed the name of the WAR (no finalName in pom.xml and changed the artifact version) and it worked .... why? I don't know till now!
A real and a genuine solution? Definitely a new Tomcat Release . . .