users@glassfish.java.net

How to add Jackson 2.0.x to Glassfish?

From: <forums_at_java.net>
Date: Thu, 6 Sep 2012 02:16:56 -0500 (CDT)

Hi, I want to deploy a WAR file which includes Jackson 2.0.5. I added the
following to the pom.xml: com.fasterxml.jackson.jaxrs
jackson-jaxrs-json-provider 2.0.5 com.fasterxml.jackson.core jackson-core
2.0.5 com.fasterxml.jackson.core jackson-databind 2.0.5 A transitive
dependency also adds: com.fasterxml.jackson.core jackson-annotations 2.0.5
When I deploy my WAR to the server, Jersey picks up the JSON-Providers: class
com.fasterxml.jackson.jaxrs.json.JsonMappingExceptionMapper class
com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider class
com.fasterxml.jackson.jaxrs.json.JsonParseExceptionMapper class
com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider However, when I query
the REST-Resource, "old" JSON is delivered. It does not come from these new
classes. I used the "fasterxml" annotations instead of the "codehaus"
annotations. I tried to set in the glassfish-web.xml. But that didn't help
either. How can I fix this problem? Greetings Jan De Cooman

--
[Message sent by forum member 'ossaert']
View Post: http://forums.java.net/node/889907