RPC bug in 1.1.0

17 views
Skip to first unread message

Tim

unread,
Aug 15, 2006, 11:44:46 AM8/15/06
to Google Web Toolkit
Sending data from the server -> client works fine.
Sending data from the client -> server doesn't.

The issue is an index out of bounds (stack trace below). Editing the
jar, I've found that it tries to access up to an index of 26, despite
the size being only 9.

[WARN] StandardContext[]Exception while dispatching incoming RPC call
java.lang.IndexOutOfBoundsException: Index: 9, Size: 9
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.extract(ServerSerializationStreamReader.java:259)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeStringTable(ServerSerializationStreamReader.java:207)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead(ServerSerializationStreamReader.java:80)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:181)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:147)
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:175)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239)

Scott Blum

unread,
Aug 15, 2006, 12:03:41 PM8/15/06
to Google Web Toolkit
Tim,

There is a known issue with client->server serialization when the same
object is serialized multiple times. There's a workaround here that
should hopefully fix the problem.

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/2a8658e93e2a8de3/

Scott

Tim

unread,
Aug 15, 2006, 12:25:12 PM8/15/06
to Google Web Toolkit
I tried this, didn't fix the issue.

Tim

unread,
Aug 15, 2006, 1:52:34 PM8/15/06
to Google Web Toolkit
The data sent from the server to the client is completetly different
than what the client is sending back to the server, is this intended?

Scott Blum

unread,
Aug 15, 2006, 2:01:24 PM8/15/06
to Google Web Toolkit
Yes, the client->server and server->client formats are slightly
different to optimize performance. It's the same basic structure, just
organized and delimited differently.

If that didn't fix the issue (and you've recompiled/cleared browser's
cache/etc), then I'm not sure what to tell you without looking at your
project.

Scott

Tim

unread,
Aug 15, 2006, 2:09:12 PM8/15/06
to Google Web Toolkit
I've figured out the problem.

My data structures were in this logic.

Master data class contained sub data classes
sub data classes contained char[] array.

if the char[] array contained a value of 0 anywhere inside it, the
token system on the server would stop at that point as a string
terminator. It looks like gwt needs to do something about char array's
containing 0.

For now I'll just explicitly set all 0's to 1 before sending.

Reply all
Reply to author
Forward
0 new messages