有什么可以帮助我解决这个问题的吗?当我尝试从SOAP Web服务获取响应时,出现以下错误跟踪:

java.lang.VerifyError: class org.bouncycastle.asn1.x500.X500Name overrides final method equals.(Ljava/lang/Object;)Z
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at org.apache.wss4j.common.crypto.CryptoBase.<clinit>(CryptoBase.java:71)
    at org.apache.wss4j.common.crypto.CryptoFactory.getInstance(CryptoFactory.java:127)
    at org.apache.wss4j.dom.handler.WSHandler.loadCrypto(WSHandler.java:945)
    at org.apache.wss4j.dom.handler.WSHandler.loadSignatureCrypto(WSHandler.java:863)
    at org.apache.wss4j.dom.handler.WSHandler.doSenderAction(WSHandler.java:152)
    at org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.access$100(WSS4JOutInterceptor.java:54)


我认为这与pom.xml文件上的某些问题有关,我正在使用apache.cxf 3.1.11版本:

<artifactId>cxf-rt-frontend-jaxws</artifactId>
    <artifactId>cxf-rt-transports-http</artifactId>
    <artifactId>cxf-rt-ws-security</artifactId>
    <artifactId>cxf-rt-ws-policy</artifactId>
and apacheCommons 3.5 version
    <artifactId>commons-lang3</artifactId>


该项目还具有:

<spring.version>3.1.0.RELEASE</spring.version>
<spring-framework.version>3.1.0.RELEASE</spring-framework.version>
<spring-security.version>3.1.0.RELEASE</spring-security.version>


提前致谢。

最佳答案

它可能对某人有用,我在项目中使用了同一库的两个版本:bcprov-jdk15on和bcprov-jdk14on。

-bcprov-jdk15on包含在cxf-rt-ws-security中

-bcprov-jdk14on包含在iText / jasperreports中

解决方案是从我的pom.xml中省略bcprov-jdk14on,因为实际上我不需要它

07-24 22:32