[SOLVED] MessageBodyWriter not found for media type=application/json

Solution

This error occurs, because you have missing jersey-media-json-jackson dependency.

To resolve the issue please add the required library to your project.

Because Maven and Gradle are two the most popular build automation tools I provide the dependency entry for each one.

Maven

<dependency>
  <groupId>org.glassfish.jersey.media</groupId>
  <artifactId>jersey-media-json-jackson</artifactId>
  <version>2.32</version>
</dependency>

Gradle

...
compile group: 'org.glassfish.jersey.media', name: 'jersey-media-json-jackson', version: '2.32'
...

Select version

Please verify which version you should add to your project. You can check the available version in Central Maven Repository.

If you enjoyed this post please add the comment below or share this post on your Facebook, Twitter, LinkedIn or another social media webpage.
Thanks in advanced!

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments