java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Hi,

I have been getting this exception out of no where.. Seems like it occurs more often when the internet line is slow or the page takes too long to load.

In this forum, some mentioned about quick successive clicking can cause similar exception. But I am not able to simulate it using quick clicking. I still thinks that it got something todo with the internet line speed.. Any idea? THANKS..

BTW.. I have my own filter class called SessionManager..

Here is the full exception..

Aug 16, 2006 5:16:38 PM com.sun.faces.lifecycle.InvokeApplicationPhase execute

SEVERE: Index: 0, Size: 0

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

at java.util.ArrayList.RangeCheck(ArrayList.java:507)

at java.util.ArrayList.remove(ArrayList.java:392)

at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:271)

at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)

at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.j ava:75)

at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)

at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)

at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:237)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:157)

at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:184)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:186)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:157)

at hellobroadcast.SessionManager.doFilter(SessionManager.java:58)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:186)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:157)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 214)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j ava:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextVal ve.java:198)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 152)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j ava:104)

at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:2 87)

at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:84)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j ava:102)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j ava:104)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j ava:102)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j ava:102)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10 9)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.j ava:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)

at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)

at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)

at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)

at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:6 83)

at java.lang.Thread.run(Thread.java:534)

[4601 byte] By [thamch] at [2007-11-26 9:31:13]
# 1
A similar issue has been filed as: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6302589
KarthikR at 2007-7-7 0:16:15 > top of Java-index,Development Tools,Java Tools...
# 2
Thanks.. Dont quite understand the "Evaluation"... Is it confirm a Tomcat bug? So maybe I should try the latest Tomcat5.0.x version (btw.. my app is still using JDK1.4)
thamch at 2007-7-7 0:16:15 > top of Java-index,Development Tools,Java Tools...
# 3

> Dont quite understand the "Evaluation"... Is it confirm a Tomcat bug?

Actually it is not a tomcat bug; the evaluation means that the bug was confirmed in registry browser while running in tomcat. (The bug was filed against registry browser which also uses faces, as do creator applications). So, the issue is not with tomcat.

The issue reported in the above bug turned out to be a bug in the registry browser (that is, in the calling code) which was fixed. So, I think, the problem in your case could be in the custom SessionManager filter in your code:

> at hellobroadcast.SessionManager.doFilter(SessionManager.java:58)

It could still be a problem in faces itself, but i think it is more likely a concurrency issue raised by the custom SessionManager code (i could be wrong of course).

Can you try debugging the code or get some more logs (either from creator logs or via System.out... statements)?

KarthikR at 2007-7-7 0:16:15 > top of Java-index,Development Tools,Java Tools...