ERROR No message body reader has been found for class, ContentType: application/json;charset=UTF-8' in CXF JAXRS
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, tools, and much more.