gwtproject / gwt

GWT Open Source Project

Home Page:http://www.gwtproject.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgrading to GWT 2.10.1 is causing IncompatibleRemoteServiceException

ReniVarghese opened this issue · comments

GWT version: 2.10.1
Operating System: Linux

Description:

While upgrading the GWT version from 2.10.0 to 2.10.1, we are facing 'IncompatibleRemoteServiceException'. We are trying to upgrade all our builds into JDK 17, and as part of that took up the upgradation of GWT version as well.

Initially, the GWT version was upgraded from 2.9.0 to 2.10.0 (with previous bom com.google.gwt and org.codehaus.mojo : gwt-maven-plugin (version 2.10.0) ) and that worked without any issues in both JDK 8 and JDK 17.

Then moved onto upgrading the GWT version to 2.10.1 with org.gwtproject bom and also modified the previous org.codehaus.mojo : gwt-maven-plugin (version 2.10.0) to the new net.ltgt.gwt.maven : gwt-maven-plugin (version 1.1.0).

However after these changes, we started noticing the below in our application.

com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: java.lang.ClassNotFoundException: https:
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:323)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:263)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:305)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
Caused by: com.google.gwt.user.client.rpc.SerializationException: java.lang.ClassNotFoundException: https:
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:708)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readObject(ServerSerializationStreamReader.java:592)
at com.google.gwt.user.server.rpc.core.java.util.Arrays$ArrayList_ServerCustomFieldSerializer.instantiate(Arrays.java:71)
at com.google.gwt.user.server.rpc.core.java.util.Arrays$ArrayList_ServerCustomFieldSerializer.instantiateInstance(Arrays.java:106)
at com.google.gwt.user.server.rpc.core.java.util.Arrays$ArrayList_ServerCustomFieldSerializer.instantiateInstance(Arrays.java:39)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.instantiate(ServerSerializationStreamReader.java:1088)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:682)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readObject(ServerSerializationStreamReader.java:592)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader$ValueReader$8.readValue(ServerSerializationStreamReader.java:149)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:434)
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:312)
... 58 more
Caused by: java.lang.ClassNotFoundException: https:
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:538)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:634)

To note:
However, the same application code works perfectly fine with a GWT version of 2.10.1 and on a windows server.

  • Same code upgraded to GWT 2.10.0 with bom com.google.gwt and org.codehaus.mojo : gwt-maven-plugin (version 2.10.0) - works in linux and windows
  • Same code upgraded to GWT 2.10.0 with bom org.gwtproject:gwt and org.codehaus.mojo : gwt-maven-plugin (version 2.10.0) - works in windows but fails in linux
  • Same code upgraded to GWT 2.10.1 with bom org.gwtproject:gwt and net.ltgt.gwt.maven : gwt-maven-plugin (version 1.1.0) - fails in linux
  • Same code upgrade to GWT 2.10.1 with bom org.gwtproject:gwt and net.ltgt.gwt.maven : gwt-maven-plugin (version 1.1.0) - works in windows

I investigated a bit and found few issues which might be similar to this one - #9224 , https://stackoverflow.com/questions/54122340/gwt-rpc-serverserializationstreamreader-deserialize-throwing-java-lang-classnotf

Tried few troubleshooting steps by following other links, but still it doesn't seem to work.(https://stackoverflow.com/questions/9534484/gwt-rpc-serializationexception, https://stackoverflow.com/questions/45063470/how-to-fix-rpc-error-incompatibleremoteserviceexception-in-a-multi-project-gwt-s)

Request for any pointers on this issue. Thanks.

The issue was because of other versions of gwt-servlet jars from other projects. When those were excluded, this issue also didn't occur anymore. Hence closing.