Hi Romain,

How can I make the below code work in Tomee 7.0.0-M2 

I am getting the below error 
SEVERE - No message body writer has been found for class
com.airhacks.HelloResource$Hello, ContentType:
application/vnd.compnay.myapp.version1+json

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

@Path("/")
public class HelloResource {

        @GET
        @Path("hello")
        @Produces("application/vnd.compnay.myapp.version1+json")
        public Hello sayHello() {
                Hello hello = new Hello();
                hello.setName("HelloWorld!!!");
                return hello;
        }

        public class Hello {
                private String name;

                public String getName() {
                        return name;
                }

                public void setName(String name) {
                        this.name = name;
                }
                
        }
}

Above code is working in tomee 7.0.0-M1.

Need your help it is mandatory to use vendor specific content type for rest
api versioning as per our company guidelines.






--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/Tomee-7-0-0-M2-JaxRs-Client-No-message-body-reader-has-been-found-for-class-ContentType-application-n-tp4677664p4677671.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to