You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Can Eskikaya <ca...@novastor.com> on 2015/05/19 17:06:33 UTC

No message body writer has been found for class

I try to get a JSON object response from my REST implementation.
For test purpose i wrote a Foo class annotated with @XmlRootElement

I use the openejb 4.7.0 version and it works like a charme

In the openejb 5.0.0-snapshot version i get the error message:
*No message body writer has been found for class
com.test.rest.common.dto.Foo, ContentType: application/json*

The service is packaged in a jar. If i return a String it works. Only the
object mapping does´t work.

I try to switch to the snapshot version cause of java-ee 7 support.


Is this a bug or a misconfiguration by me?



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/No-message-body-writer-has-been-found-for-class-tp4674911.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: No message body writer has been found for class

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

7.x doesnt activate jettison (jaxb to json) by default since it is broken
in 99% of the cases, you have to configure JsonProvider from cxf manually
(in openejb-jar.xml for instance) to get it back



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-05-19 17:06 GMT+02:00 Can Eskikaya <ca...@novastor.com>:

> I try to get a JSON object response from my REST implementation.
> For test purpose i wrote a Foo class annotated with @XmlRootElement
>
> I use the openejb 4.7.0 version and it works like a charme
>
> In the openejb 5.0.0-snapshot version i get the error message:
> *No message body writer has been found for class
> com.test.rest.common.dto.Foo, ContentType: application/json*
>
> The service is packaged in a jar. If i return a String it works. Only the
> object mapping does´t work.
>
> I try to switch to the snapshot version cause of java-ee 7 support.
>
>
> Is this a bug or a misconfiguration by me?
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/No-message-body-writer-has-been-found-for-class-tp4674911.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>