我正在使用 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)
...
当发出“maven clean”,然后是“maven install”并重新启动服务器时,有时不会抛出异常,并且应用程序工作正常。然而,大多数时候,它不起作用。
我想不需要扫描 bouncycastle 依赖项来获取注释。
我可以以某种方式禁用某些罐子的扫描吗?
我已经尝试添加metadata-complete="true"
到我的 web.xml 并增加堆栈大小但没有结果。
我可以做什么来解决这个问题?
就我而言org.bouncycastle.asn1.DEREncodableVector
导致循环依赖的类由类路径中的两个 jar 提供服务。
bcprov-jdk15on-1.47.jar
and bcprov-jdk16-1.45.jar
排除了不需要的 jar(bcprov-jdk16-1.45.jar),效果很好
示例:如果 apache CFX Web 服务安全性添加了不必要的 bcprov maven 依赖项,则可以按如下方式排除它
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-security</artifactId>
<version>${org.apache.cxf.version}</version>
<exclusions>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
</exclusion>
</exclusions>
</dependency>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)