This is likely caused by the missing json provider in the
jaxrs.providers list, e.g. in web.xml
        <init-param>
            <param-name>jaxrs.providers</param-name>
            
<param-value>com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider</param-value>
        </init-param>
or some dependency is missing.
I'll look at your sample.
regards, aki

2015-03-12 20:06 GMT+01:00 Ron Ratovsky <[email protected]>:
> Greetings!
>
> As part of the work we do with Swagger, we provide samples of integration
> with various JAX-RS frameworks, including CXF.
>
> In our last release, something broke with our CXF sample and we can't find
> the way to solve it properly. The code base for the sample is similar all
> across our samples and it's a basic pet store application. The problem is
> when calling the API endpoints requesting application/json, we get the
> message "No message body writer has been found for response class Pet.". It
> works well for xml.
>
> The odd part is that we didn't change anything with the code regarding the
> CXF integration and the only difference was the upgrade of our own library.
> Switching to an older version of our library seems to fix the problem. We
> do include our own provider as well, but as far as I recall that hasn't
> changed between versions.
>
> I would appreciate it if anyone has the time and can look into this
> project. The README explains how to easily run it. Once it's running,
> executing http://localhost:8002/api/pet/1 with the application/json mime
> type would exhibit the problem.
>
> The project is located at
> https://github.com/swagger-api/swagger-core/tree/develop_2.0/samples/java-jaxrs-cxf
> (note this is the develop_2.0 branch, if you clone it, though the problem
> exists in master as well).
>
> Otherwise, if anyone has any suggestions what to look into or what other
> information to provide, please let me know.
>
> Thanks for the help,
> Ron
>
> --
> -----------------------------------------
> http://swagger.io
> https://twitter.com/SwaggerApi
> -----------------------------------------

Reply via email to