关于tomcat 中 java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.Lifecyc

一、问题描述

 信息: Starting service Catalina

2020-7-17 9:15:42 org.apache.catalina.core.StandardEngine startInternal

信息: Starting Servlet Engine: Apache Tomcat/7.0.40

2020-7-17 9:15:42 org.apache.catalina.startup.HostConfig deployWAR

信息: Deploying web application archive D:\apache-tomcat-7.0.40\webapps\项目名称.war

2020-7-17 9:15:44 org.apache.catalina.core.ContainerBase addChildInternal

严重: ContainerBase.addChild: start:

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/项目名称]]

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.deployWAR(HostConfig.java:977)

at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1654)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

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

Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/项目名称]] 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.jaxen.util.AncestorAxisIterator->org.jaxen.util.AncestorOrSelfAxisIterator->org.jaxen.util.AncestorAxisIterator]

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

2020-7-17 9:15:44 org.apache.catalina.startup.HostConfig deployWAR

二、问题解决办法

  1. 更改tomcat配置文件catalina.properties。
  2. tomcat.util.scan.DefaultJarScanner.jarsToSkip=\ 值后面加",*"。

       如:tomcat.util.scan.DefaultJarScanner.jarsToSkip=\,*

posted @ 2020-07-18 16:33  刘草草  阅读(4620)  评论(0编辑  收藏  举报