本文介绍了IllegalArgumentException:com.sun.xml.internal.messaging.saaj.soap.LocalStrings!= com.sun.xml.messaging.saaj.soap.LocalStrings的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Web应用程序中,我正在联系Web服务(使用JAX-WS),但是出现以下错误:

In my web-application, I am contacting a Web-Service (using JAX-WS) but I get the following error:

java.lang.ExceptionInInitializerError
    at com.sun.xml.ws.message.AttachmentUnmarshallerImpl.<clinit>(AttachmentUnmarshallerImpl.java:55)
    at com.sun.xml.ws.client.sei.ResponseBuilder$DocLit.readResponse(ResponseBuilder.java:500)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:242)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:210)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
        ...
Caused by: java.lang.IllegalArgumentException: com.sun.xml.internal.messaging.saaj.soap.LocalStrings != com.sun.xml.messaging.saaj.soap.LocalStrings
    at java.util.logging.Logger.getLogger(Logger.java:314)
    at com.sun.xml.messaging.saaj.soap.AttachmentPartImpl.<clinit>(AttachmentPartImpl.java:71)
    ... 189 more

当我在Eclipse中运行应用程序时,这会在我的机器上发生...

This happen on my machine, when I run my application in Eclipse...

此错误的根源是什么?

我怀疑此 Oracle Java错误,但是我正在运行我在Tomcat 5.5和Java 1.6.0_18中的Web应用程序,如我的System.properties:

I was suspecting this Oracle Java bug, but I am running my web-application in Tomcat 5.5 and Java 1.6.0_18, as shown in my System.properties:

java.runtime.name = Java(TM) SE Runtime Environment
sun.boot.library.path = C:\Program Files\Java\jdk1.6.0_18\jre\bin
java.vm.version = 16.0-b13
java.runtime.version = 1.6.0_18-b07
java.version = 1.6.0_18

推荐答案

问题已解决.这是由于第三方依赖性saaj-impl-1.3.jar在我的环境中与在其他官方"环境中稍有不同...

Problem solved. This was due to a third-party dependency, saaj-impl-1.3.jar which was slightly different in my environment than in the other "official" environments...

这篇关于IllegalArgumentException:com.sun.xml.internal.messaging.saaj.soap.LocalStrings!= com.sun.xml.messaging.saaj.soap.LocalStrings的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 05:44