简体   繁体   English

执行JAX-RPC时出错

[英]Error in executing JAX-RPC

Help me on this exception , Occurs during calling wcf webservice Log by netbeans 帮我解决此异常,在通过NetBeans调用wcf webservice日志期间发生

Exception in thread "main" java.lang.ExceptionInInitializerError
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:107)
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
    at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
    at $Proxy32.logon(Unknown Source)
    at newtestclient.NewTestClient.main(NewTestClient.java:92)
Caused by: java.lang.ClassCastException: com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to com.sun.xml.internal.bind.api.JAXBRIContext
    at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.<clinit>(SOAPFaultBuilder.java:533)
    ... 5 more

Java Result: 1 Java结果:1

The exception says : 例外说明:

java.lang.ClassCastException: com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to com.sun.xml.internal.bind.api.JAXBRIContext . java.lang.ClassCastException: com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to com.sun.xml.internal.bind.api.JAXBRIContext

It's a common error that appears when there is a conflict between libraries and its dependencies. 当库及其依赖项之间发生冲突时,会出现这种常见错误。 You should try to execute your code in a test project with only the libraries from JAX-RPC, and then add one by one the rest of your app libraries. 您应该尝试仅使用JAX-RPC中的库在测试项目中执行代码,然后将其余的所有应用库一一添加。

Also, you should check your server libraries to discard any kind of conflict for having the same library (or its dependencies) in your app and in your server with different versions. 另外,您应该检查服务器库,以放弃应用程序和具有不同版本的服务器中具有相同库(或其依赖项)的任何类型的冲突。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM