I am creating a REST service with jersey.
Here the request handler class's method.
@POST
@Path("/deleteWorkers")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response deleteWorkers(DeleteWorkerPOJO deleteWorkerPOJO) {......}
This method gives below error
SEVERE: A message body reader for Java type, class <classname>, and MIME media type, application/json, was not found
There are some several POST methods in the same class which does not consume POJOs. They are working fine.
And many developers has suggested, I have added jersy-json
library and
<param-name>
com.sun.jersey.api.json.POJOMappingFeature
</param-name>
<param-value>
true
</param-value>
Still this gives the same error.
Jersey version is 1.2 and java version is 1.5