The stack trace suggests it happens on the client side:
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 $Proxy31.getExchangeRate(Unknown Source)
at
scatours.CurrencyConverterWSClient.main(CurrencyConverterWSClient.java:40)
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
I have no previous version of JDK 1.6.0, but I can try to get hold of a few...
-- Sebastian
> -----Original Message-----
> From: Simon Nash [mailto:[email protected]]
> Sent: Tuesday, September 07, 2010 5:54 PM
> To: [email protected]
> Subject: Re: JAXB 2.1 incompatibilty between Tuscany 1.6 and JDK
> 1.6.0_18
>
> Millies, Sebastian wrote:
> > Hello there,
> >
> > when I run a JAX-WS client (not SCA component) that accesses a remote
> SCA service (in a different JVM)
> > which offers a binding.ws, I get a ClassCastExceptions in the innards
> of JAXB:
> >
> > 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>(SOAPFaultBuilde
> r.java:533)
> > ... 5 more
> >
> > The ClassCastException occurs only when the service throws an
> application specific exception which
> > must be mapped to a web fault.
> >
> > I am using JDK 1.6.0_18 and Tuscany 1.7 snapshot. The client side
> artefacts get generated with JDK's
> > built-in wsimport tool.
> >
> > The exception goes away when I remove jaxb-impl-2.1.7.jar from
> %TUSCANY_HOME%\lib.
> > So I suppose the jaxb library included in Tuscany is incompatible
> with what is
> > included in the rt.jar of JDK 1.6.0_18.
> >
> > -- Sebastian
> >
> Does the problem occur on the client side or the SCA service side?
>
> Are you able to try this on older version of JDK 1.6? Knowing which
> JDK release introduced the problem might be helpful in identifying
> its cause.
>
> Simon