I have recently started using CXF to create a restful service that returns JSON output.
Having first created a simple Hello World service to ensure my configuration was correct I then went on to elaborate the service. My next step was to return a simple POJO called Client that simply contained String properties for firstName, surname and a Date property for createdDate. The object being returned was instantiated using the new operator and this was working fine having. The class had been annotated using JAXB annotations. My next step was to retrieve the object from the database using Hibernate, it is at this point that I am currently having problems. The object is returned from the DAO however it has been enhanced by CGLIB so does not appear to be recognised at this point I get the message: 09-Jan-2011 20:47:03 org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor writeResponseErrorMessage WARNING: No message body writer has been found for response class Client$$EnhancerByCGLIB$$604e17d1. I am using the following: Tomcat 6.0 Hibernate 3 CXF 2.3.1 Spring 3.0.5 If anyone could advise of the best why to solve this problem I would be grateful. Regards -- View this message in context: http://cxf.547215.n5.nabble.com/Using-Hibernate-results-in-No-message-body-writer-found-tp3335611p3335611.html Sent from the cxf-user mailing list archive at Nabble.com.
