Tomcat启动报错org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:

早上我还没上班呢,甲方直接给我甩了一个日志文件,说他们的服务端出问题了,我心想这我哪会搞啊!随手百度了一下没想到还真解决了(>人<;)
具体报错如下:

13-Apr-2023 08:25:45.523 警告 [localhost-startStop-1] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [4.0]. Default version will be used.
13-Apr-2023 08:25:59.343 严重 [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
	org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/xxxxx]
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
		at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1140)
		at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at java.lang.Thread.run(Thread.java:748)
	Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/xxxxx] 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.ASN1Boolean->org.bouncycastle.asn1.DERBoolean->org.bouncycastle.asn1.ASN1Boolean]
		at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2100)
		at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2044)
		at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1990)
		at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1960)
		at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1913)
		at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1153)
		at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:765)
		at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
		at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
		... 10 more
13-Apr-2023 08:25:59.352 严重 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Error deploying web application directory [C:\apache-tomcat-8.5.32\webapps\xxxxx]
	java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/xxxxx]]
		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:758)
		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
		at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1140)
		at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at java.lang.Thread.run(Thread.java:748)
1.找一下这个文件

Tomcat启动报错org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:_第1张图片

2.替换下这两行Tomcat启动报错org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:_第2张图片

拉近一点
Tomcat启动报错org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:_第3张图片
配置如下:

#tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar,\
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*
#tomcat.util.scan.DefaultJarScanner.jarsToSkip=*.jar,\
tomcat.util.scan.DefaultJarScanner.jarsToSkip=*

如果没有就直接添加。

3.初步判断是启动的时候有什么依赖包没扫到,排查太复杂,直接给他整成全扫。

没想到还真整好了。
参考地址:绝对有效

你可能感兴趣的:(Exception,tomcat,apache,java)