关于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 @   刘草草  阅读(4658)  评论(0编辑  收藏  举报
编辑推荐:
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
阅读排行:
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决
点击右上角即可分享
微信分享提示