GWT 2.6 Serialize issue when redeploy project and do NOT close the Browser.

451 views
Skip to first unread message

Ronggen

unread,
Jul 10, 2015, 1:47:10 AM7/10/15
to google-we...@googlegroups.com
Steps to produce this issue:
    1. deploy GWT project to server.
    2. open browser to access it.
    3. change any shared POJO which need to be serialized, this will change the strong name of serialization policy.
    4. re-deploy the project, and do NOT close the Browser.
    5. do some operation in your project.

The error:
[#|2015-07-09T22:05:12.014-0700|INFO|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=20;_ThreadName=Thread-2;|PWC1412: WebModule[null] ServletContext.log():techServlet: ERROR: The serialization policy file '/IMSChangeMan/B10ED1C148FA6A9D8A391125ABE1E3B3.gwt.rpc' was not found; did you forget to include it in this deployment?|#]

[#|2015-07-09T22:05:12.017-0700|INFO|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=20;_ThreadName=Thread-2;|PWC1412: WebModule[null] ServletContext.log():techServlet: WARNING: Failed to get the SerializationPolicy 'B10ED1C148FA6A9D8A391125ABE1E3B3' for module 'http://testimsgf/IMSChangeMan/IMSChangeMan/'; a legacy, 1.3.3 compatible, serialization policy will be used.  You may experience SerializationExceptions as a result.|#]

com.google.gwt.user.client.rpc.SerializationException: Type 'com.tech.entity.qautil.code_lookup.AppRef' 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 = com.tech.entity.qautil.code_lookup.AppRef@7093b8d8


I know why we can NOT load the serialization policy file after redeploy, it's because the strong name is updated; but i don't understand why we can NOT fix this issue by refreshing the browser.

anyone encountered the same issue, please help ~!


Thanks,
Ronggen

Jens

unread,
Jul 10, 2015, 4:18:39 AM7/10/15
to google-we...@googlegroups.com
Most likely you have not configured HTTP caching headers correctly and your browser caches your <modulename>.nocache.js file even tough it should not do so. Only *.cache.* files can be cached, e.g. your <permutation-strongname>.cache.js file.

Your browser must check for newer versions of *.nocache.* files before using a cached version. I forgot the name but there is a project on github that has servlet filters that will set correct headers. Alternatively you could apply the headers on your loadbalancers / reverse proxies in front of your app server.

-- J.

avs...@gmail.com

unread,
Jul 10, 2015, 9:29:28 AM7/10/15
to google-we...@googlegroups.com
https://github.com/realityforge/gwt-cache-filter
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Ronggen

unread,
Jul 12, 2015, 11:41:58 PM7/12/15
to google-we...@googlegroups.com
Jens,

Yes, the issue is caused by the cache,Thanks; but do you know why I encountered the error 'The Response could not be deserialized' when i refresh my browser after STEP #5, I'm sure it get the new serialization policy after refreshing the browser, and I can fix it by restarting my Glassfish server.

Ronggen

unread,
Jul 12, 2015, 11:42:40 PM7/12/15
to google-we...@googlegroups.com
Thanks Asier;
Reply all
Reply to author
Forward
0 new messages