Tuesday, July 18, 2017

Re: SerializationException when application is modified

We use https://github.com/realityforge/gwt-cache-filter to help deal with caching issues.

On 07/18/2017 12:15 PM, Óscar Frías Barranco wrote:

When we modify the code of our GWT application, in particular the classes that travel through GWT calls, these exceptions are generated for many users for a few hours:

com.google.gwt.user.client.rpc.SerializationException: Type '.....' was not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom field serializer.For security purposes, this type will not be serialized.: instance = .....

We think that this is due to browsers caching the previous (old) code which is no longer aligned with the server code.  We have reviewed all HTTP headers related to caching and all of the are, we think, correctly configured.

So our plan is to force a reload of the browser page with a location.reload(true) when we detect that the SerializationException is being thrown at the server.  Any ideas about how to implement this easily?  Our code if full of AsyncCallback calls and we would like to avoid editing each one of them.  Is there a place where we could insert a client code that would be executed for every RPC call and that will call location.reload(true) if a SerializationException is thrown ?


You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment