Java.lang.IllegalStateException: Unable to complete the scan for annotations for web application

异常处理 0 2105
小小草
小小草 2022年1月2日 21:14 发表
严重: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sateproject]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
	at org.apache.catalina.corea.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1750)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/saproject] 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 [oracle.net.aso.C00->oracle.net.aso.C12->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object]
	at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2066)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2012)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1961)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1936)
	at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1897)
	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1149)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:771)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:305)
	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.StandardContext.startInternal(StandardContext.java:5066)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 10 more

十二月 02, 2019 2:51:31 下午 org.apache.catalina.startup.HostConfig deployDescriptor
严重: Error deploying configuration descriptor F:\Workspace\eclipseluna\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\sateproject.xml
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sateproject]]
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1750)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

采用这种方法:
https://blog.csdn.net/k18381315803/article/details/81004101
在tomcat/bin/catalina.sh中添加如下代码:

JAVA_OPTS="-server -Xms1024m -Xmx2048m -Xss1024K -XX:PermSize=1024m -XX:MaxPermSize=2048m"

仍然报错
根据 https://stackoverflow.com/questions/46520372/opencms-in-java
发现有lib下有两个ojdbc包,删除掉一个即可

点赞 0 收藏(0)    分享
相关标签: tomcat
问题没解决?让AI助手帮你作答 AI助手
0 个评论
  • 消灭零评论