tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexdron <alex_d...@dell.com>
Subject Re: TomEE 1.7 -> 7.x migration - Arquillian and JAX-RS providers
Date Fri, 16 Dec 2016 23:53:19 GMT
Romain,
Do you know if that was resolved?

I have a similar issue. Jackson provider v2.1.5 was working perfectly fine
along with Tomee Plus 7.0.1 until we upgraded jackson-jaxrs-json-provider to
version 2.8.5. And for some reason it is not picked anymore by CXF.

We extend JacksonJaxbJsonProvider and specify MediaType.APPLICATION_JSON for
Consume/Produce. We also added it to conf/system.properties 
(cxf.jaxrs.providers and openejb.cxf.jaxrs.providers).
We added openejb-jar.xml to container, though it used to work before upgrade
even without it.

Looking at catalina.out I see our class is mentioned on startup so I guess
it was registered. At the same time, I don't see in that log any registered
Johnzon classes except WadlDocumentMessageBodyWriter.

With all that said, REST calls fail because of "invalid" incoming JSON,
which did not happen before provider upgrade:

Caused by: org.apache.johnzon.mapper.MapperException: Unable to parse 1 to
class java.lang.String
	at org.apache.johnzon.mapper.Mapper.mapObject(Mapper.java:613)
	at org.apache.johnzon.mapper.Mapper.readObject(Mapper.java:569)
	at
org.apache.johnzon.jaxrs.JohnzonMessageBodyReader.readFrom(JohnzonMessageBodyReader.java:76)
	at
org.apache.johnzon.jaxrs.DelegateProvider.readFrom(DelegateProvider.java:51)
	at
org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1342)

Apparently Jackson is skipped. 

I suspect it is somehow related to implemented JAX-RS spec (javax.ws.rs).
Version 2.1.5, which works fine with Tomee 7.0.1, has dependency on
"jsr311-api". The latest version of Jackson (2.8.5) is based on another
specification of the same group - "javax.ws.rs-api".
That is the only difference I found so far.

Can you recommend us anything else on top of what was already done?
Thanks,
Alex



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/TomEE-1-7-7-x-migration-Arquillian-and-JAX-RS-providers-tp4680520p4680770.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Mime
View raw message