There’s a problem with the DynamicClient with the in-JDK XJC things.   In 
general, it works OK outside of karaf as the jaxb-xjc jar gets picked up and 
the in-jdk version isn’t used.   In karaf, there’s an issue. 

I fixed this last week as part of commit 
cfda95f21681b4193ca9b8c3c5749b2c067aac15.

Dan


On May 4, 2014, at 11:56 PM, dchen <[email protected]> wrote:

> Hi,
> 
> I am using JaxWsDynamicClientFactory to createWS client factory as follwing:
> 
>        JaxWsDynamicClientFactory wsClientFactory =
> JaxWsDynamicClientFactory.newInstance();
>        Client wsClient = wsClientFactory.createClient(wsAddress);
> 
> It runs fine outside of karaf, but when running in side karaf (2.3.1), it
> throws the following error:
> 
> 
> java.lang.IllegalArgumentException: Can not set final
> com.sun.tools.internal.xjc.reader.internalizer.InternalizationLogic field
> com.sun.tools.internal.xjc.reader.internalizer.DOMForest.logic to
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory$1
>       at
> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:164)
>       at
> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:168)
>       at
> sun.reflect.UnsafeQualifiedObjectFieldAccessorImpl.set(UnsafeQualifiedObjectFieldAccessorImpl.java:83)
>       at java.lang.reflect.Field.set(Field.java:680)
>       at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.hackInNewInternalizationLogic(DynamicClientFactory.java:817)
>       at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:314)
>       at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:235)
>       at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:228)
>       at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:183)
> 
> Does anyone know why?
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://cxf.547215.n5.nabble.com/Karaf-java-lang-IllegalArgumentException-when-using-JaxWsDynamicClientFactory-tp5743682.html
> Sent from the cxf-user mailing list archive at Nabble.com.

-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to