Strange GWT exception

In the previous post I’ve described a way to pass object from GWT to servlet.

In the initial version I’ve used GET request and used URL.encode() to encode parameter data. However the length of the parameter can easily exceed limit of 2083 symbols. Please see the following page for more details on the url length limitations.

So I’ve started using POST request. And suddenly got the following GWT exception:
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: This application is out of date, please click the refresh button on your browser. ( Expecting version 5 from client, got 5. )

So I’ve tried to recompile application several times. Nothing changed.
I’ve debugged into the GWT code and it appears that the reason was in the non-decoded string value passed as the parameter. After I have decoded data by using URLDecoder.decode it started working fine in POST request.

So the invalid format of string made GWT to throw such a strange exception.