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"

Solution Verified - Updated -

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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content