users@glassfish.java.net

Re: JAX-RS works great standalone, but fails in GFv3.1

From: Jakub Podlesak <jakub.podlesak_at_oracle.com>
Date: Wed, 13 Jul 2011 11:21:45 +0200

Hi all,

Markus posted the message to the Jersey user mailing list.
Will continue the discussion there. Here is the link:

http://java.net/projects/jersey/lists/users/archive/2011-07/message/77

~Jakub

On 07/12/2011 02:50 PM, forums_at_java.net wrote:
> Our JAX-RS application is working well standalone (Grizzly) as well as in
> GFv2ur2 (Jersey-1.4 bundled in our EAR), but fails in GFv3.1
> (Jersey-1.5 is
> part of GF)!
>
> In particular, we are providing a custom ContextResolver which provides
> (besides more) two classes: "QuerySchemaDiscovery" and
> "BasicSearchSchema".
> Within "getContext" we are doing some output to see what class was
> requests
> (for debug purposes).
>
> Our resource method receives a "QuerySchemaDiscovere" instance (i. e.
> JAXB
> can resolve it using our custom ContextResolver), then wants to return an
> instance of "BasicSearchSchema". And here is the funny thing: GFv3.1 says
> that "BasicSearchSchema" is not part of the JAXB context. Moreover,
> there is
> a log entry found for "getContext(QuerySchemaDiscovere)" but NOT for
> "getContext(BasicSearchSchema)", so obviously is seems GFv3.1 is using a
> differen context...
>
> Caused by: javax.xml.bind.JAXBException: class
> net.java.dev.webdav.jaxrs.search.xml.elements.BasicSearchSchema nor
> any of
> its super class is known to this context.
> at
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:611)
>
> at
> com.sun.xml.bind.v2.runtime.property.ArrayReferenceNodeProperty.serializeListBody(ArrayReferenceNodeProperty.java:112)
>
> ... 56 more
>
>
> I cannot believe that it is a bug in my application, as it runs
> standone and
> in GFv2ur2, so I think it is a bug in GFv3.1. Any ideas what to do?
>
>
> --
>
> [Message sent by forum member 'mkarg']
>
> View Post: http://forums.java.net/node/821155
>
>
>