Factor Three
Factor Three

Reputation: 2274

Need to get Jackson JARS for Jersey

I am trying to pass JSON data in a post to a Jersey- based REST service. After getting HTTP 415 errors, I researched and learned that Jersey needs certain Jackson Jars in order to handle JSON.

I have been trying to find the correct Jars, but every link I am finding seems to point to places where there are a lot of README files and XML files but no Jars!

There are also several links provided here on Stack Overflow to Jackson jars. They either don't work, point to links without jars, or point to versions that will not work with Jersey v2.

Worse, I cannot find a consistent list of the Jackson jars needed for Jersey! I keep seeing different lists of Jar files that I cannot find.

Can someone please point me to the correct Jackson jars needed to provide Jersey with JSON processing??? Where can I find and download them?

Upvotes: 0

Views: 3149

Answers (1)

Paul Samsotha
Paul Samsotha

Reputation: 208964

Just grab all the below Jars.

jackson deps

You can find all of them here. Just search for them individually.

If you are registering your providers individually, regiser

  • JacksonJaxbJsonProvider for basic JSON/POJO support.
  • JsonMappingExceptionMapper for an ExceptionMapper for JsonMappingException
  • JsonParseExceptionMapper for an ExceptionMapper for JsonParseException

Or if you are registering packages to be scanned, add this package

  • com.fasterxml.jackson.jaxrs.json

Note: The above image is from an older post. Jackson is at 2.6.1 right now. If you want, you can get the newest version. Doesn't make a difference. Just make sure all the jars are the same version

Upvotes: 3

Related Questions