Hi, please remove Jettison provider on the client side too and register
Jackson instead and it all should start working.
I'm not sure why it worked in 3.1.1 given that the error is very much
JAXB specific. I don't recall changing anything at all with respect to
the way CXF JSONProvider interacts with JAXB.
If you can provide a bean source then I can do a quick test with
JSONProvider, but if you use Jackson on the server then use it on the
client too...
Sergey
Hy,
I have removed dependencies from jettison, but on client side i have the
same problem.
I have written a rest client and use as Provider JAXB Implementation.
With cxf 3.1.1 all work, but updating to cxf 3.1.2 now i have unmarshall
exception. Here my stack trace :
10:16:30.648 [main] INFO o.g.g.m.rest.RSListenerBasicServices -
@@@ RSListenerWMSService.afterTestClass @@@
10:16:30.648 [main] INFO o.e.j.server.handler.ContextHandler - stopped
o.e.j.s.h.ContextHandler{/geoplatform-service,null}
Tests run: 19, Failures: 0, Errors: 19, Skipped: 0, Time elapsed: 8.396 sec
<<< FAILURE! - in org.geosdi.geoplatform.model.rest.RSAccountTest
forceTemporaryAccountTestRest(org.geosdi.geoplatform.model.rest.RSAccountTest)
Time elapsed: 0.294 sec <<< ERROR!
org.apache.cxf.interceptor.Fault: No message body writer has been found for
class org.geosdi.geoplatform.request.InsertAccountRequest, ContentType:
application/json
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:582)
at
com.sun.xml.bind.v2.runtime.property.SingleReferenceNodeProperty.serializeBody(SingleReferenceNodeProperty.java:109)
at
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:360)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializer.java:593)
at
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInfoImpl.java:341)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:494)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:323)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:178)
at
org.apache.cxf.jaxrs.provider.json.JSONProvider.marshal(JSONProvider.java:506)
at
org.apache.cxf.jaxrs.provider.json.JSONProvider.marshal(JSONProvider.java:623)
at
org.apache.cxf.jaxrs.provider.json.JSONProvider.writeTo(JSONProvider.java:393)
at
org.apache.cxf.jaxrs.utils.JAXRSUtils.writeMessageBody(JAXRSUtils.java:1372)
at
org.apache.cxf.jaxrs.client.AbstractClient.writeBody(AbstractClient.java:468)
at
org.apache.cxf.jaxrs.client.ClientProxyImpl$BodyWriter.doWriteBody(ClientProxyImpl.java:826)
at
org.apache.cxf.jaxrs.client.AbstractClient$AbstractBodyWriter.handleMessage(AbstractClient.java:1052)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at
org.apache.cxf.jaxrs.client.AbstractClient.doRunInterceptorChain(AbstractClient.java:636)
at
org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:696)
at
org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:226)
at com.sun.proxy.$Proxy202.insertAccount(Unknown Source)
at
org.geosdi.geoplatform.model.ServiceTest.createAndInsertUser(ServiceTest.java:140)
at
org.geosdi.geoplatform.model.rest.BasicRestServiceTest.setUp(BasicRestServiceTest.java:93)
at
org.geosdi.geoplatform.model.rest.RSAccountTest.setUp(RSAccountTest.java:66)
Regards Giuseppe
2015-08-28 15:28 GMT+02:00 Sergey Beryozkin <sberyoz...@gmail.com>:
Hi
What is the problem more precisely ?
Possibly related to:
https://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS#JAX-RS-CXF3.1.2ProviderSortingChanges
Make sure you have no Jettison dependency on the classpath.
Can you check it please ?
Sergey
On 28/08/15 14:20, Giuseppe La Scaleia wrote:
Hello,
recently i have update to cxf 3.1.2.
I have a problem with JacksonJaxbJsonProvider.
The problem is relative to Unmarshall MessageBody.
With Previous cxf version (3.1.1) all work.
Regard Giuseppe
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/