0

Help me on this exception , Occurs during calling wcf webservice Log by netbeans

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

Cœur
  • 37,241
  • 25
  • 195
  • 267
prakash singh
  • 101
  • 1
  • 9

1 Answers1

0

The exception says :

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.

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.

maqjav
  • 2,310
  • 3
  • 23
  • 35