SEVERE: MessageBodyWriter not found for media type=application/json, type=…

If you’re trying to produce JSON content using JAX-RS (Jersey) and you’re getting this error:

SEVERE: MessageBodyWriter not found for media type=application/json, type=class ..., genericType=class ...

This means that you are missing a JSON library in your classpath. Jackson is one I’m using so adding this to your pom.xml will help:

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

8 thoughts on “SEVERE: MessageBodyWriter not found for media type=application/json, type=…

  1. Thank you, thank you, THANK YOU!!! You just saved me lots of time. Been banging my head against the wall with this error in my new jetty/jersey stack and couldn’t figure out why. This did it. Really, awesome post. Did I already say thank you? 🙂

    Like

Leave a comment