? ? ? 最近使用tomcat 7.XXXX年版本搭建web应用,在应用部署时出现以下错误:
?
严重: ContainerBase.addChild: start:?
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/HSN]]
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:652)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1263)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1948)
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:662)
Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/HSN] 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.apache.commons.httpclient.HttpException->org.apache.commons.httpclient.URIException->org.apache.commons.httpclient.HttpException]
at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2144)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2090)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1965)
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1931)
at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1916)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1330)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
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:5416)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
?
?
? ? 解决方法:修改apache-tomcat-7.0.62\conf\catalina.properties 文件,在tomcat.util.scan.DefaultJarScanner.jarsToSkip值后添加 "*.jar",成功能解决此问题