Spring's Json not being resolved with appropriate response

Get rid of all Jackson beans, and of the json mapping in the negotiating resolver. the mvc:annotation-driven should configure everything you need for the Jackson serialization to work.


  1. Make sure the POJO you return has get()ers, one for each field.
  2. Make sure the appserver (Tomcat) has the libraries even if you are sure your build system (Eclipse/Maven) does.

I've had this error twice now. Just now I added getters to my pojo. The 406 error went away and I got JSON as expected. I assume that because my fields were package-protected (the default access), it would grab them, but I guess not. For the record, in case it matters, I also made the POJO implement Serializable, toString(), serialVersionUID, no-arg constructor, and explicit constructors.

The prior time I cleaned/cleared/refreshed my Tomcat cache and did whatever else to force it to reload. I believe when I added the Jackson dependencies, it fixed my compile time errors, but since tomcat missed them, at runtime Spring MVC did not discover the Jackson libraries, and produced the 406 error about unacceptable response type.


Also, make sure that you add two jackson related jar files.

  • jackson-core-asl-1.9.8.jar
  • jackson-mapper-asl-1.9.8.jar

The version can be different.