Error when acessing a RESTEasy resource method: "Could not find MessageBodyWriter for response object of type" or "Could not find MessageBodyReader for response object of type"
Issue
-
I am getting the following error about MessageBodyWriter when trying to access my RESTful WEB Service:
ERROR org.jboss.resteasy.core.SynchronousDispatcher - Failed executing GET /{your context} ERROR [STDERR] org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not find MessageBodyWriter for response object of type: {your bean/POJO class} of media type: {Media type requested} -
I am getting the following error about MessageBodyReader when trying to access my RESTful WEB Service:
ERROR org.jboss.resteasy.core.SynchronousDispatcher - Failed executing POST /{your context} ERROR [STDERR] org.jboss.resteasy.spi.BadRequestException: Could not find message body reader for type: class {your pojo} of content type: {Media type requested}
Environment
- RESTEasy 1.x
- JBoss Enterprise Application Platform 5.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
