org.apache.catalina.LifecycleException:无法启动组件

时间:2014-05-27 08:40:48

标签: java eclipse spring tomcat catalina

使用我的应用程序启动tomcat服务器时出现此错误。

我真的不明白,但如果我在eclipse中“清理”几次,或者如果我停止启动tomcat服务器几次它会以某种方式工作,但如果我停止它会再次发生。

任何想法?

WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:datalinx-backend' did not find a matching property.
May 27, 2014 11:23:36 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(D:\Applications\STS\vfabric-tc-server-developer- 2.9.2.RELEASE\base-instance\wtpwebapps\datalinx-backend\WEB-INF\lib\javax.el-api-2.2.4.jar)    - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/el/Expression.class
May 27, 2014 11:23:36 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(D:\Applications\STS\vfabric-tc-server-developer-2.9.2.RELEASE\base-instance\wtpwebapps\datalinx-backend\WEB-INF\lib\javax.servlet-api-3.0.1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
May 27, 2014 11:23:36 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(D:\Applications\STS\vfabric-tc-server-developer-2.9.2.RELEASE\base-instance\wtpwebapps\datalinx-backend\WEB-INF\lib\tomcat-embed-core-7.0.52.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class      May 27, 2014 11:23:36 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(D:\Applications\STS\vfabric-tc-server-developer-2.9.2.RELEASE\base-instance\wtpwebapps\datalinx-backend\WEB-INF\lib\tomcat-embed-el-7.0.52.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/el/Expression.class
May 27, 2014 11:23:39 AM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/backend]]
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:1637)
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:724)
Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/backend] due to a StackOverflowError. Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies. The class hierarchy being processed was [org.bouncycastle.asn1.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1.ASN1EncodableVector]
at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2179)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2126)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:2001)
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1967)
at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1952)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1326)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
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
 May 27, 2014 11:23:39 AM org.apache.catalina.startup.HostConfig deployDescriptor
 SEVERE: Error deploying configuration descriptor D:\Applications\STS\vfabric-tc-server-developer-2.9.2.RELEASE\base-instance\conf\Catalina\localhost\backend.xml
 java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/backend]]
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:1637)
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:724)

  May 27, 2014 11:23:39 AM org.apache.catalina.startup.HostConfig deployDirectory

1 个答案:

答案 0 :(得分:1)

首先,它看起来像Pivotal的tc Server而不是Apache Tomcat。 tc Server基于Apache Tomcat,但它们并不完全相同,它总是有助于提供最合适的信息。

您的依赖项存在严重问题。 Tomcat正在检测以下类heirarchy:

org.bouncycastle.asn1.ASN1EncodableVector   - > org.bouncycastle.asn1.DEREncodableVector    - > org.bouncycastle.asn1.ASN1EncodableVector

这是循环依赖。在Java中,如果B扩展A,则A扩展B是非法的。

清理你的依赖项并确保你只使用一个版本的充气城堡JAR应该解决这个问题。

如果问题仍然存在并且可以在最新稳定的Tomcat 7发行版的干净安装中重现,那么请打开针对Apache Tomcat的错误并提供演示该问题的Web应用程序。