You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by kdesin <ka...@gmail.com> on 2012/07/31 18:11:27 UTC
No message body writer has been found for response class
JSONObject.
Hi all,
I am facing this issue after trying out on few solutions:
No message body writer has been found for response class JSONObject.
a)I have made sure that the JSONProvider is defined:
<jaxrs:providers>
<bean class="org.apache.cxf.jaxrs.provider.json.JSONProvider">
<property name="serializeAsArray" value="true"/>
<property name="arrayKeys" value="true"/>
</bean>
</jaxrs:providers>
b)I am using CXF 2.6.1 and Jboss4.2.3GA(no up-gradation is feasible as of
now)
I have the cxf-2.6.1.jar as well in my WEB-INF/lib folder
Please let me know if any other jars are required or is the cause of this
issue something else?
-----
Saludos
Kartheek
--
View this message in context: http://cxf.547215.n5.nabble.com/No-message-body-writer-has-been-found-for-response-class-JSONObject-tp5711773.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: No message body writer has been found for response class
JSONObject.
Posted by kdesin <ka...@gmail.com>.
Thanks Sergey.Yes..I was returning a JSONObject directly.
I fixed it by returning the JSONObject's toString method.Issue is resolved.
-----
Saludos
Kartheek
--
View this message in context: http://cxf.547215.n5.nabble.com/No-message-body-writer-has-been-found-for-response-class-JSONObject-tp5711773p5711857.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: No message body writer has been found for response class JSONObject.
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 31/07/12 19:11, kdesin wrote:
> Hi all,
>
> I am facing this issue after trying out on few solutions:
>
> No message body writer has been found for response class JSONObject.
>
> a)I have made sure that the JSONProvider is defined:
>
> <jaxrs:providers>
> <bean class="org.apache.cxf.jaxrs.provider.json.JSONProvider">
> <property name="serializeAsArray" value="true"/>
> <property name="arrayKeys" value="true"/>
> </bean>
> </jaxrs:providers>
> b)I am using CXF 2.6.1 and Jboss4.2.3GA(no up-gradation is feasible as of
> now)
>
> I have the cxf-2.6.1.jar as well in my WEB-INF/lib folder
>
> Please let me know if any other jars are required or is the cause of this
> issue something else?
>
Does the resource method return JSONObject directly ? At the moment
JSONProvider is not capable of directly managing JSONObjects, which can
be fixed - please provide more info
Cheers, Sergey
>
>
>
>
> -----
> Saludos
> Kartheek
> --
> View this message in context: http://cxf.547215.n5.nabble.com/No-message-body-writer-has-been-found-for-response-class-JSONObject-tp5711773.html
> Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com