karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neehal <nsha...@actiance.com>
Subject Re: JacksonJaxbJsonProvider doesn't work properly after upgrading CXF to 3.x
Date Fri, 11 May 2018 10:10:35 GMT
Hi Lukasz,
Thank you for you reply. I actually have found a solution to this problem.
It all happened because CXF 3.x registers its own JSONProvider and uses it
by default. Hence even if want to use JacksonJaxbJsonProvider or
JacksonJsonProvider, it wont be honored if we had any Jaxb annotations in
our code. I removed my Jaxb annotations and it all worked fine. But we
actually wanted to use Jaxb annotations too. So we needed a way to skip the
registration of the default JSONProvider.

We put the following in our blueprint where we defined our rest endpoints:

<cxf:bus>
        ...
        <cxf:properties>
          
          <entry key="skip.default.json.provider.registration" value="true"
></entry>
        </cxf:properties>
    </cxf:bus>


I found this solution at https://access.redhat.com/solutions/3150741





--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Mime
View raw message