#15 GWT 2.2 / 2.3 compatibility


I upgraded my GWT from 2.1 to 2.3 (beta) and it seems there is an incompatibility with Gilead.

More specifically, java.sql.Timestamp types will not serialize correctly. Deserialization on the client results in a SerializationException. The reason is that the Timestamp that was serialized on the server doesn't match the type signature that the client expects for deserialization.

After quite a bit of digging, I discovered that the Timestamp_FieldSerializer that ships with Gilead conflicts with one that was apparently introduced in GWT 2.2 or 2.3. Type signatures for classes with custom serializers appear to depend (recursively) on the type signature for the serializer class. So, on the server (where Gilead is loaded) the class loader picks up the Gilead serializer which influences the generated type signature for Timestamp classes. However, on the client side, when the GWT compiler emits the rpc whitelist, Gilead is not loaded, so the class loader picks up the custom serializer shipped with the new version of GWT. Hence, the two type signatures don't match.

Ok, that's the long explanation. Thankfully, the fix is easy.

Just remove the custom serializers from the Gilead distribution. It worked for my project.


  • How can I remove the custom serializers from Gilead distribution?

  • Cuchaz

    Just delete the class files from the Gilead Jar file. I don't remember the names of the classes off of the top of my head, or which jar file it is, but it shouldn't be hard to find out.

  • Izaak Alpert
    Izaak Alpert

    To remove the custom serializers I followed the advice here: http://stackoverflow.com/questions/5914189/rpc-error-after-gwt-2-3-upgrade (FWIW I used the create copies of the searilzers in my project).

    Would be nice to see this incorporated in the gilead project, it seems that some people are using the last built release with hibernate 3.6, this didn't work for me (i had to build from svn the 2088 revision)

  • RedruM

    I have tried both techniques (adding the package to my project , and removing it from gilead) but it doesn't work.
    can someone please give me a litte hint

  • Inside the jar gilead4gwt you should delete the whole package from google.

    Ex: "com.google ........."

  • I just verified the solution posted to this problem on 2011-09-26 12:32 PDT. Deleting the com.google.* package from the gilead4gwt- does in fact solve this issue.

    I am not sure if the original maintainer is still on these emails and I know this project has a status of inactive but I would think this would be worthy of a new build. I am not sure if any users have shown an inclination to make this project active again, however I think this project still garners a fair amount of interest for use in lots of GWT projects.

    I know there's something to be said about analyzing the source code to understand how this framework works, but besides the tutorial and overview available on the client friendly version of this site, are there any in depth technical documents available on how Gilead was developed, outlining any gotcha's and how to move forward with maintaining/adapting the framework to future changes that come along with GWT?