Exception while dispatching incoming RPC call java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

287 views
Skip to first unread message

Marley

unread,
Jun 16, 2009, 5:06:16 PM6/16/09
to Google Web Toolkit
I am getting a: Exception while dispatching incoming RPC call
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0, as soon as i
try to call something on the server. It is before any of my server
side code executes

what is odd, is this only happens on my Ubuntu box...i can run it on
my Windows box just fine.

I am using GWT 1.5.3 and GXT 1.2.4

Sumit Chandel

unread,
Jun 18, 2009, 8:24:23 PM6/18/09
to Google-We...@googlegroups.com
Hi Marley,

I'm guessing that since the exception isn't coming from the server, as no server-side code was executed by the time the exception is thrown, that this occurred in hosted mode and is coming from somewhere in your client-side GWT code.

I would recommend looking up the stack trace back to your GWT client-code to see where the IndexOutOfBoundsException is being thrown from. If you could find that, post it up here and we should be able to provide a bit more help. The difference between this working on your Windows machine and not on your Ubuntu box could be in the SWT bindings.

Hope that helps,
-Sumit Chandel

TimTimGo

unread,
Jun 24, 2009, 7:00:19 AM6/24/09
to Google Web Toolkit
Hi,
I recently upgradet to GWT 1.6.4 and my application just worked fine
for a while, so I kept developing. Then suddenly when I compiled my
latest changes I got an IndexOutOfBounds exception on the serverside
when loading the application in a browser. The stacktrace reveals that
my own code is not excecuted so now I don't know where to find the
source of the error. I reverted my code to an earlier version which I
know of that it worked before, but it does not now. I also checked
that the latest gwt libraries are in use, they all seem to be up to
date.
It would be great if anybody had an idea what the reason could be or
where I could continue my search.

Here is the serverside stacktrace:

Exception while dispatching incoming RPC call
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.extract
(ServerSerializationStreamReader.java:617)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readInt
(ServerSerializationStreamReader.java:432)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.prepareToRead
(AbstractSerializationStreamReader.java:38)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead
(ServerSerializationStreamReader.java:383)
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:234)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
(RemoteServiceServlet.java:163)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:362)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:729)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.jetty.bio.SocketConnector$Connection.run
(SocketConnector.java:228)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:488)

Everybody who can: thanks for your help!
Timo

TimTimGo

unread,
Jun 25, 2009, 2:38:23 AM6/25/09
to Google Web Toolkit
Hi,
thanks for posting this again. I've seen this before but it didn't
solve my problem. The mistake was not in the client side code. It was
in my buildpath. The server exidentally used gwt-servlet.jar instead
of gwt-user.jar. I fixed my build path and now it works again.
Thanks for your help
Timo
Reply all
Reply to author
Forward
0 new messages