ERROR No message body reader has been found for class, ContentType: application/json;charset=UTF-8' in CXF JAXRS

Solution Verified - Updated -

Issue

  • We defined a REST Swagger contract and have a mix for GET / POST services. GET services are working fine but however when we hit the POST service and error 415 ( Unsupported Media Type ) is returned. We have defined Media Type ( application/json ) on the code but still its not able to recognize it.

  • Also, we have an issue that when we post some request we get the error message :
    ERROR No message body reader has been found for class com.redhat.TestClass, ContentType: application/json;charset=UTF-8

  • Here is the exception we see in the logs,


[ qtp859651165-27] JAXRSUtils ERROR No message body reader has been found for class com.redhat.TestClass, ContentType: application/json;charset=UTF-8 [ qtp859651165-27] WebApplicationExceptionMapper WARN

Environment

  • Red Hat JBoss Fuse
    • 6.2.x
  • Apache CXF

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.