java.lang.LinkageError:覆盖方法“ org / w3c / dom / Node.setUserData

时间:2018-12-16 20:40:52

标签: java soap

我正在尝试致电网络服务,但得到以下回应:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>java.lang.LinkageError: loading constraint violation when overriding method "org/w3c/dom/Node.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;" during creation of class "com/ibm/ws/webservices/engine/xmlsoap/SOAPPart": loader "org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader@6d776858" of class "com/ibm/ws/webservices/engine/xmlsoap/SOAPPart" and loader "com/ibm/oti/vm/BootstrapClassLoader@7d4883b2" of class "org/w3c/dom/Node" have different types for the method signature</faultstring>
         <detail/>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

我正在将应用程序从Java 6更新为Java 8,将Websphere 8.0更新为9.0.3,在较低版本上,一切正常,但是更新后,该部分不再起作用。

以上错误仅在应用程序启动后第一次调用端点时得到,其余时间得到:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>java.lang.NoClassDefFoundError: com/ibm/ws/webservices/engine/SOAPPart</faultstring>
         <detail/>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

类加载策略是首先使用本地类加载器加载的类(最后是父类加载的类)

我不知道还能尝试什么,在主pom中像下面这样声明了行为:

 <dependency>
     <groupId>com.ibm.websphere.ws</groupId>
     <artifactId>runtime</artifactId>
     <version>9.0.0</version>
     <scope>provided</scope>
</dependency>

并在下面需要的模块中使用它:

<dependency>
    <groupId>com.ibm.websphere.ws</groupId>
    <artifactId>runtime</artifactId>
</dependency>

我不知道该怎么办......

0 个答案:

没有答案