MAPPED_JETTISON
notation in the JSONConfiguration
which worked fine with Java JDK 1.6u10. However when I changed this to Natural
notation to support my GXT application expected output, I recieved the following error:
javax.xml.bind.JAXBException: property "retainReferenceToInfo" is not supported at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:63) ...
Upon re-reading the dependency notes of Jersey, I noticed the following note: "This module depends on the JAXB reference implementation version 2.1.10 or greater, and such a version is required when enabling support for the JAXB natural JSON convention..." . The version of JAXB shipped with JDK 1.6 is not at a high enough level to support this functionality. Fortuantely the workaround to get this to work is pretty easy if you following the following steps:
- Download the JAXB jar from the Jersey depenendencies:
jaxb-api-2.1.jar
and save this to a local location. - Copy the
jaxb-api-2.1.jar
to thejre/lib/endorsed
folder of your JRE or JDK installation. You may need administrative privileges on some platforms. - Restart eclipse (or other IDE).
- In your project class path, include the other JAXB jar files listed under the "non maven developers require... section of the JAXB portion of the document
Information on the endorsed libraries is available here.
No comments:
Post a Comment