MessageBodyWriter not found for media type=application/json
I was able to fix it by install jersey-media-json-jackson Add the dependency to pom.xml
I was able to fix it by install jersey-media-json-jackson Add the dependency to pom.xml
Basically I corrected it like below and everything worked fine.
You have downloaded Jersey 2 (which RI of JAX-RS 2). The tutorial you’re referring to uses Jersey 1. Download Jersey 1.17.1 from (here), should be sufficient for you. Jersey 1 uses com.sun.jersey, and Jersey 2 uses org.glassfish.jersey hence the exception. Also note that also init-param starting with com.sun.jersey won’t be recognized by Jersey 2. Edit Registering Resources and Providers in Jersey 2 contains … Read more
This is an old question, but one that is frequently visited and clear recommendations are now available from RFC 7303 which obsoletes RFC3023. In a nutshell (section 9.2):
The problem: indicates that you try to use the Jersey 2.x servlet, but you are supplying the Jersey 1.x libs. For Jersey 1.x you have to do it like this: For more information check the Jersey 1.x documentation. If you instead want to use Jersey 2.x then you’ll have to supply the Jersey 2.x libs. In a maven based project you can use the following: For Jersey … Read more
I am trying to get a web service to work which returns a JSON (JAX-RS with jersey implementation on Tomcat). However, I am getting the below exception. I have looked at the similar problems here, but none of the solutions work for me, and it’s been more than half a day 🙁 The resource class … Read more