MessageBodyReader not found for media type=application/json
You can use jersey json library:
<dependency> <groupId>org.glassfish.jersey.media</groupId> <artifactId>jersey-media-json-jackson</artifactId> <version>2.22</version></dependency>
Or genson:
<dependency> <groupId>com.owlike</groupId> <artifactId>genson</artifactId> <version>1.3</version></dependency>
Sorry to resurrect this post, but I was having this problem with a Maven project and found that I needed to include a dependency for jackson-jaxrs-json-provider
in my pom:
<dependency> <groupId>com.fasterxml.jackson.jaxrs</groupId> <artifactId>jackson-jaxrs-json-provider</artifactId> <version>2.4.1</version></dependency>
MVN Repository: http://mvnrepository.com/artifact/com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider
Your entity class does not have an empty constructor, which is needed for the JAX-RS unmarshalling.
Have a look here:
https://blogs.oracle.com/groundside/entry/jax_rs_2_0_messagebodyreader