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>
Advertisements

7 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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s