我正在使用STS(eclipse插件)和maven开发Spring MVC应用程序.
为了创建项目,我按照STS向导进行了一个新的"Spring MVC项目".之后,我向其他项目和库添加了一些依赖项.
但是,当我现在尝试将项目部署到STS的集成vFabric服务器时,我有时会遇到异常:
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/wsa]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
...
Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/app] 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.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1.ASN1EncodableVector]
at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2179)
...
Run Code Online (Sandbox Code Playgroud)
当发出"maven clean",然后是"maven install"并重新启动服务器时,异常有时不会被抛出并且应用程序正常工作.然而,大多数时候,它不起作用.
我想没有必要扫描bouncycastle依赖项的注释.
我可以以某种方式禁用某些罐子的扫描吗?
我已经尝试添加metadata-complete="true"到我的web.xml并增加堆栈大小而没有结果.
我该怎么做才能解决这个问题?
我们正在运行旧版本的Tomcat,并且新的Web应用程序已经导致像这样的堆栈跟踪
Caused by: java.lang.StackOverflowError
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2269)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2269)
at org.apache.catalina.startup.ContextConfig.populateSCIsForCacheEntry(ContextConfig.java:2269)
Run Code Online (Sandbox Code Playgroud)
这已在https://bz.apache.org/bugzilla/show_bug.cgi?id=53871中提及,后来的版本(如Tomcat 8)似乎没有受到影响.
我怎样才能解决这个问题?