Reputation: 1
I am new to GWT and I am upgrading my existing GWT application to java 8 (jdk1.8.0_251) and tomcat 8(8.0.53), it is working fine on windows machine but when I tried to deploy on host linux machine with exactly same java and tomcat configuration it is giving error com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: The response could not be deserialzied
if there is GWT version incompatibility issue with java 8 or tomcat 8 it should not work in windows ? what could be the other possible reasons and where to look ? I am using following configuration
After investigation I found out that only Date type is not getting deserialized. Is there any specific format or date related settings for tomcat 8 ?
Upvotes: 0
Views: 90
Reputation: 621
I have had this exception multiple times and it was also dependent on the server configuration/version, but it is not particularly a difference between Windows and Linux.
To make it work always, make sure that all your transfer objects (client-server) are serializable. A class is serializable if it meets these three requirements:
I personally like that all my DTO (Data transfer object) always implement both com.google.gwt.user.client.rpc.IsSerializable and java.io.Serializable:
public class Contact implements IsSerializable, Serializable
Also check if you the paths for translatable code (the DTO you use) are specified in the .gwt.xml file e.g.:
<source path='client' />
<source path='shared' />
<source path='server/my/special/package/pojos' />
The first two paths are there by default, but if you want to send use a specific package outside those paths it must be specified here.
Upvotes: 0