RPC error after updating GWT 2.3

After upgrading to GWT 2.3, some of my RPC services no longer work and fail with "The response cannot be deserialized." It seems Services returning objects that use Date objects that are annotated with @Temporal (TemporalType.TIMESTAMP). I use Gilead 1.3.2 and Hibernate 3.6, and I had no problems with GWT 2.2. Any idea what might happen, or how to start debugging?

Here's the stack trace:

com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: The response could not be deserialized at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:221) at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java: 287) at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395) at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:132) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214) at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352) at java.lang.Thread.run(Thread.java:680) Caused by: com.google.gwt.user.client.rpc.SerializationException: java.sql.Timestamp/1769758459 Caused by: com.google.gwt.user.client.rpc.SerializationException: java.sql.Timestamp/1769758459 at com.google.gwt.user.client.rpc.impl.SerializerBase.getTypeHandler(SerializerBase.java:153) at com.google.gwt.user.client.rpc.impl.SerializerBase.instantiate(SerializerBase.java:114) at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:111) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119) at com.lensoo.shared.entity.Course_FieldSerializer.deserialize(Course_FieldSerializer.java:320) at com.lensoo.shared.entity.Course_FieldSerializer.deserial(Course_FieldSerializer.java:405) at com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:95) at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:113) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119) at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter$ResponseReader$8.read(RequestCallbackAdapter.java:106) at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:214) ... 26 more ... 26 more 
+7
source share
4 answers

I have a very similar problem - Gilead 1.3.1, Hibernate. An exception also complains about the Timestamp field.

Here is something I found on the Gilead website:

"Timestamp_FieldSerializer, which comes with conflicts between Gilead and the one that was apparently introduced in GWT 2.2 or 2.3."

http://sourceforge.net/tracker/index.php?func=detail&aid=3285026&group_id=239931&atid=1111398

A simple fix is ​​offered at the end of the Details section, but I have not tried it yet.

+3
source

If you don't want to touch the JAR - when you use Gilead 1.3.2 as Maven dependecy, there is a better solution I found today.

The conflict of Gilead serializers should be obscured by them from GWT 2.3, but since both JARs are at the same level, and positioning inherit in gwt.xml does not help, they should be redefined in your project structure. "New" serializers will take precedence both on the server and on the compiled client. Finally, you get working GWT 2.3 and Gilead 1.3.2.

In steps:

  • Create the com.google.gwt.user.client.rpc.core.java.sql package in your project.
  • Using Eclipse open gwt-servlet-2.3.jar and find the package above with the three files Date_CustomFieldSerializer.class , Time_CustomFieldSerializer.class and Timestamp_CustomFieldSerializer.class . You should see the source if Maven downloaded it.
  • Restore these source files in your project.

I assume that the Gilead team should remove serializers in the next version and then remove them from their project.

+3
source

You can just search [project_path] / war / WEB-INF / lib for the json.jar library and add it to the build path (I'm using Eclipse).

0
source

It is very simple. You just need to remove the com.google.* gilead4gwt-1.3.2.1839.jar from gilead4gwt-1.3.2.1839.jar .

In fact, he solves this problem.

0
source

All Articles