Saturday, 15 January 2011

json - Configure Wildfly 8.1 to use Jettison -



json - Configure Wildfly 8.1 to use Jettison -

i have interesting problem in wildfly 8.1 installation using jackson (not jackson 2) marshalling classes json. utilize jettison in order take advantage of jaxb annotations have in classes.

to forcefulness server utilize jettison instead of jackson, i've performed next steps :

modified pom.xml dependencies depend on resteasy-jettison-provider module scope set provided

< dependency > < groupid >org.jboss.resteasy</ groupid > < artifactid >resteasy-jettison-provider</ artifactid > < version >3.0.8.final</ version > < scope >provided</ scope > </ dependency >

modified jboss-deployment-structure.xml in web-inf directory include jettison module , exclude jackson modules:

< jboss-deployment-structure > < deployment > < exclusions > < module name="org.jboss.resteasy.resteasy-jackson-provider" /> < module name="com.fasterxml.jackson.core.jackson-core" /> < module name="com.fasterxml.jackson.core.jackson-annotations" /> < module name="com.fasterxml.jackson.core.jackson-databind" /> < module name="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider" /> < module name="org.jboss.resteasy.resteasy-jackson2-provider" /> </ exclusions > < dependencies > < module name="org.jboss.resteasy.resteasy-jettison-provider" /> </ dependencies > </ deployment > </ jboss-deployment-structure >

when start server, send simple bit of json log application:

{ "authrequest": { "applogin":"restful", "apppassword":"mypassword" } }

however, next exception server when send code snippet:

com.fasterxml.jackson.databind.exc.unrecognizedpropertyexception: unrecognized field "authrequest" (class com.myapp.appauthrequest), not marked ignorable

from exception, looks jackson still beingness used, despite configuration.

can point out i'm doing wrong or misconfiguration have?

json jaxb jackson wildfly jettison

No comments:

Post a Comment