I have a problem with the serialisation of one object. Sometimes it
works and sometimes it doesn't and I get a SerializationException (see
detailed description below). Do you have any idea were this strange
behavior comes from and why it sometimes DOES work? Thanks

Detailed description:

When compiling our project one serializable object (let's call it
MyObject) sometimes is not listed in the *.gwt.rpc file. MyObject (and
all dependencies) fulfills all requirements for gwt serialization
(default constructor, implement Serializable and IsSerializable,
object has all getter and setter). MyObject contains quite a lot
dependencies but so do other objects in our project as well without
any problems. The strange thing is that sometimes the rpc file is
complete and sometimes it's not, I can not tell when.

When I tried to find the error source I figured that the reason might
be a member in MyObject that is a reference to the object itself. (I
got a complete rpc file several times after setting this member to
transient). Also MyObject contains generics. I saw that gwt checks the
different serializable objects not in a specific order, that might be
the reason why it works sometimes.


The incomplete *.gwt.rpc file results in a SerializationException (see
stack trace below):

com.google.gwt.user.client.rpc.SerializationException: null     at
com.google.gwt.user.client.rpc.impl.SerializerBase.check(SerializerBase.java:
161)    at
com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:
145)    at
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:
199)
...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
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