Such annotations are not GWT compatible (i.e., they are not known to the 
GWT emulated JRE and definitely cannot be compiled in js, even providing 
the relative sources - that I think they can be found in jaxb-api-src.jar 
inside the jaxb distribution).
To allow jaxb annotations (and annotations only) to be used in 
client/shared side, you have to tell the gwt compiler to compile those 
classes ignoring such annotations while still allow the server side to use 
them.
See http://code.google.com/p/google-web-toolkit/issues/detail?id=4020#c8 
for the workaround.

If you are using an XmlAdapter (the class) in client code, move it to 
server side (i.e., keep your marshalling/unmmarshalling logic in the 
server).

I assumed you are using GWT-RPC of course. With RequestFactory you should 
have no problem at all.

On Wednesday, June 20, 2012 11:33:54 PM UTC+2, shawnjohnson wrote:
>
> I am having this issue as well.  The annotations are in models in our 
> 'shared' package - shared between client and server.  Anyone know what I 
> should change to resolve this?
>
> On Thursday, December 30, 2010 1:38:27 PM UTC-5, Andrea Boscolo wrote:
>>
>> I suppose you are trying to use that annotation on a client side 
>> class; javax is not emulated by gwt compiler, so you couldn't use it 
>> client side. 
>>
>> Why not moving the adapter to the server side? Does your client really 
>> need it? 
>> Annotated jaxb classes can be used by the client (with a couple of 
>> tweaks and not for all annotations), but marshalling/unmarshalling to/ 
>> from xml, still need to be handled server side. In this point of view, 
>> the adapter can be known only to your server. 
>>
>> I can tell you the tweak, but first try to move it server side. 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/6GpT7o35rQ8J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to