I have a web project that is now being built using GWT 1.5.3. The
project has been in development for a few months now and just this
morning started throwing this exception - though I don't recall any
changes that were introduced when the exception started appearing:
13:17:06,752 ERROR [[/admin]] Exception while dispatching incoming RPC call
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
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:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:613)
The section of code where this is occurring is in the onModuleLoad of
the app, when I add a Composite-derived object to a VerticalPanel. I
know it's this spot as I've added Window.alerts to trace it.
I'm just curious if anyone has any suggestions on how I can troubleshoot
this? I've tried rebuilding, redeploying and clearing the browser cache.
Just for completeness, here is the code I am using that throws the
exception:
private LoginComposite login = new LoginComposite();
private HorizontalPanel page = new HorizontalPanel();
private VerticalPanel view = new VerticalPanel();
public void onModuleLoad() {
// Do some set up stuff...
page.setWidth("100%");
page.setSpacing(10);
page.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
view.setWidth("100%");
view.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
view.add(login); // Exception is thrown here...
// view panel is added to a FlexTable inside createLayout()
page.add(createLayout());
RootPanel.get().add(page);
}
I'm certainly not suggesting that the VerticalPanel object is buggy, but
would like to know what types of errors cause this exception. Thanks
for any, and all, suggestions.
John