IncompatibleRemoteServiceException

24 views
Skip to first unread message

Simon

unread,
Apr 14, 2008, 3:17:48 PM4/14/08
to Google Web Toolkit
All,

I try to send a list of objects to a remote service. If the list
contains 20 objects the call is processed without any problem. If the
list contains > 20 objects I receive the following exception:

WARN] StandardContext[]An IncompatibleRemoteServiceException was
thrown while processing this call.
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:
java.lang.reflect.InvocationTargetException
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:299)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
264)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:
187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
com.google.gwt.dev.shell.GWTShellServlet.service(GWTShellServlet.java:
253)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
214)
Caused by: com.google.gwt.user.client.rpc.SerializationException:
java.lang.reflect.InvocationTargetException
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:
195)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
61)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:
78)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeWithDefaultFieldDeserializer(ServerSerializationStreamReader.java:
256)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:
220)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:
178)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
61)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:
78)
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:293)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
264)
Caused by: java.lang.reflect.InvocationTargetException: null
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
at java.lang.reflect.Method.invoke(Method.java:615)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeWithCustomFieldDeserializer(ServerSerializationStreamReader.java:
243)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:
217)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:
178)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
61)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:
78)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeWithDefaultFieldDeserializer(ServerSerializationStreamReader.java:
256)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:
220)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:
178)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
61)
Caused by: com.google.gwt.user.client.rpc.SerializationException:
java.lang.IllegalArgumentException
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:
192)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
61)
at
com.google.gwt.user.client.rpc.core.java.util.HashSet_CustomFieldSerializer.deserialize(HashSet_CustomFieldSerializer.java:
34)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
at java.lang.reflect.Method.invoke(Method.java:615)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeWithCustomFieldDeserializer(ServerSerializationStreamReader.java:
243)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:
217)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:
178)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
61)
Caused by: java.lang.IllegalArgumentException: null
at
sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:
81)
at java.lang.reflect.Field.set(Field.java:684)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeWithDefaultFieldDeserializer(ServerSerializationStreamReader.java:
266)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:
220)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:
178)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
61)
at
com.google.gwt.user.client.rpc.core.java.util.HashSet_CustomFieldSerializer.deserialize(HashSet_CustomFieldSerializer.java:
34)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
at java.lang.reflect.Method.invoke(Method.java:615)

Sys out says:

com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:
This application is out of date, please click the refresh button on
your browser
at
ch.lab.client.services.FormEditorService_TypeSerializer.create_com_google_gwt_user_client_rpc_IncompatibleRemoteServiceException_FieldSerializer(transient
source for ch.lab.client.services.FormEditorService_TypeSerializer:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
at java.lang.reflect.Method.invoke(Method.java:615)
at
com.google.gwt.dev.shell.moz.MethodDispatch.invoke(MethodDispatch.java:
78)
at com.google.gwt.dev.shell.moz.LowLevelMoz._invoke(Native Method)
at com.google.gwt.dev.shell.moz.LowLevelMoz.invoke(LowLevelMoz.java:
124)
at
com.google.gwt.dev.shell.moz.ModuleSpaceMoz.doInvoke(ModuleSpaceMoz.java:
95)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
468)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
248)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
113)
at
ch.lab.client.services.FormEditorService_TypeSerializer.instantiate(transient
source for ch.lab.client.services.FormEditorService_TypeSerializer:
152)
at
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:
92)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
61)
at ch.lab.client.services.FormEditorService_Proxy
$2.onCompletionImpl(transient source for
ch.lab.client.services.FormEditorService_Proxy:121)
at ch.lab.client.services.FormEditorService_Proxy
$2.onCompletionAndCatch(transient source for
ch.lab.client.services.FormEditorService_Proxy:107)
at ch.lab.client.services.FormEditorService_Proxy
$2.onCompletion(transient source for
ch.lab.client.services.FormEditorService_Proxy:101)
at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
at java.lang.reflect.Method.invoke(Method.java:615)
at
com.google.gwt.dev.shell.moz.MethodDispatch.invoke(MethodDispatch.java:
78)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native
Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:
1428)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840)
at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:689)
at com.google.gwt.dev.GWTShell.run(GWTShell.java:550)
at com.google.gwt.dev.GWTShell.main(GWTShell.java:321)


The problem does only appear in hosted mode. In the compiled mode
everything works as expected.

Thanks for your help,
Simon

Sebastien

unread,
Apr 15, 2008, 12:51:52 AM4/15/08
to Google Web Toolkit
Hi Simon,

Have you see the following message in your stack trace ?
> Caused by: java.lang.reflect.InvocationTargetException: null
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:

Do you have null object into your list ?
Maybe it is the problem ...

Seb

Miguel Méndez

unread,
Apr 15, 2008, 6:48:51 AM4/15/08
to Google-We...@googlegroups.com
Is the data the same between hosted and web modes?  What version of GWT are you using?

Simon

unread,
Apr 15, 2008, 2:43:53 AM4/15/08
to Google Web Toolkit
Hi Sebastien,

Yes, I've seen the exception.

But this whould mean that a methode could not be created using
reflection during deserialization, right?
I've casted and printed all objects in the list to make sure I have no
null values or other classes in it. There are neither of it.
Anyway, I'll double-check tonight.

Is there a good reason why it is working in compiled mode?

BTW: My environment is 1.4.62 under linux. I've tested it under 1.4.61
with the same effect.

Thanks,
Simon

Simon

unread,
Apr 15, 2008, 8:17:24 AM4/15/08
to Google Web Toolkit
@Sebastien
I have seen this exception too.
There are no null values in the list.
I'll check tonight if one of the getters returns null. Though, I would
not expect GWT to throw an exception because of this?!
To be it looks like a method in the DTO cannot be found. Is it
possible to have an old version of the bean somewhere as JS
representation?
I've cleand the project and deleted the www folder without success.

@ Miguel
Yes, the data is exactly the same.
I'm using 1.4.62 (but the problem also appears under 1.4.61) under
linux (SES 10.1).

Is it possible that hibernate is causing the exception?
I've used hibernate4gwt but replaced it with beanutils because I
thought the exception is sourcing from the hibernate4gwt
deserialization process.
No luck on this one.

Simon

unread,
Apr 16, 2008, 4:51:12 PM4/16/08
to Google Web Toolkit
All,

After two days of debugging I'm still at the same spot.
The object sent to the server contains neither null values nor empty
lists.

An interesting effect (besides the one mentioned above) I have is that
the first server call is successful and the second (with the same
data) fails.

The sequence is as follows:
1) Client: Call a server function
2) Server: Load data from the DB
3) Server: Get rid of the hibernate wrappers using beanutils
4) Server: Send the object to the client
5) Client: Send the modified object back to the server
6) Server: Save the changes in the DB -> Works
7) Client: Send the same data again to the server -> results too in
the above exception before I reach the RemoteServiceServlet

Has someone a hint? What else can I do?

Cheers,
Simon

Simon

unread,
Apr 17, 2008, 10:54:00 AM4/17/08
to Google Web Toolkit
My Eclipse pointed to an IBM JDK. :-/

Everything fine now after replacing it though a Sun JDK.

Cheers,
Simon

Miguel Méndez

unread,
Apr 21, 2008, 10:16:55 AM4/21/08
to Google-We...@googlegroups.com
That is strange -- I have not theories as to why there might be an issue with IBM JDK.
--
Miguel
Reply all
Reply to author
Forward
0 new messages