On Feb 4, 2009, at 6:06 PM, Farrukh Najmi wrote:
>
> However, I then got the following server startup error:
>
> SEVERE: The provider class, class mypkg.rest.JAXBContextResolver,
> could not be instantiated
> javax.xml.bind.JAXBException: property "retainReferenceToInfo" is
> not supported
> at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
> 114)
> at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
> 188)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun
> .reflect
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun
> .reflect
> .DelegatingMethodAccessorImpl
> .invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:
> 133)
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
> at
> com.sun.jersey.api.json.JSONJAXBContext.<init>(JSONJAXBContext.java:
> 342)
> at
> org
> .freebxml
> .omar
> .server
> .interfaces.rest.JAXBContextResolver.<init>(JAXBContextResolver.java:
> 26)
>
> Paul pointed out this is likely due to my using an older version of
> JAXB. Jersey needs :
>
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-impl</artifactId>
> <version>2.1.10-SNAPSHOT</version>
> </dependency>
>
> I will report back on my results in a bit. Thanks very much to Paul
> and Jakub for their help.
>
Thanks!
Note that by the time Jersey releases there should be a stable version
of JAXB 2.1.10 available.
Paul.