1 Reply Latest reply on Dec 16, 2011 9:59 AM by jconway07

    Problem with Index out of bounds being thrown by IteratedExpression.getItem in jstl.jar

    jconway07 Newbie

      Hi,

       

      I am using RichFaces 3.3.1 and jstl 1.2.1.

       

      Apologies for the lack of a code example but I'm not sure I could replicate the issue in a simple example.

       

      The exception below has started to appear recently in my RichFaces application. It is a web front end for querying a database and display the data in a simple table. The problem occurs when my application finishes executing my code on the bean linked to a command button. It calls FilterChain.doFilter when you click the button on the popup panel, then completes the code on the bean, then i assume while trying to rerender the main window this exception is thrown.

       

      The problem appeared when a new entry point to this same popup panel that performs the same code on the bean when the button is clicked that works fine, however since this new entry point was added the old one has started throwing this exception.

       

      I know it's unlikely anyone will be able to provide an answer to the problem without code but having little understanding of how these filter chains work, I am not even sure where to start looking and was wondering if anyone could point me in a direction that might lead me to finding a solution.

       

      Looking at the code for the getItem method it appears it is trying to iterate over a list object which could be of type collection, iterator, enumeration, map or string up to the index 'i', variable name, passed into the method. This "originalListObject" is a value on a ValueExpression mapped to an ELContext. So does anyone have any idea on what might cause this method to pass an index value not in the originalListObject?

       

      The service is running on WASCE 2.1.

       

       

      Any help will be greatly appreciated.

       

      {code} javax.servlet.ServletException: IteratedExpression.getItem: Index out of Bounds

                at javax.faces.webapp._ErrorPageWriter.throwException(_ErrorPageWriter.java:549)

                at javax.faces.webapp.FacesServlet.handleLifecycleException(FacesServlet.java:293)

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

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

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

                at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)

                at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

                at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)

                at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

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

                at myPackage.jsfutils.HibernateSessionRequestFilter.doFilter(HibernateSessionRequestFilter.java:45)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

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

                at myPacakge.jsfutils.CheckLogonFilter.doFilter(CheckLogonFilter.java:81)

                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:233)

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

                at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)

                at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:406)

                at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)

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

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

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

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

                at org.apache.geronimo.tomcat.valve.ThreadCleanerValve.invoke(ThreadCleanerValve.java:40)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

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

          Caused by: java.lang.RuntimeException: IteratedExpression.getItem: Index out of Bounds

                at javax.servlet.jsp.jstl.core.IteratedExpression.getItem(IteratedExpression.java:75)

                at javax.servlet.jsp.jstl.core.IteratedValueExpression.getValue(IteratedValueExpression.java:60)

                at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:64)

                at org.apache.el.parser.AstValue.getValue(AstValue.java:112)

                at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)

                at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)

                at javax.faces.component.UIData.getValue(UIData.java:1081)

                at org.ajax4jsf.component.UIDataAdaptor.getValue(UIDataAdaptor.java:1624)

                at org.ajax4jsf.component.SequenceDataAdaptor.getDataModel(SequenceDataAdaptor.java:65)

                at org.ajax4jsf.component.SequenceDataAdaptor.createDataModel(SequenceDataAdaptor.java:59)

                at org.richfaces.component.UIDataTable.createDataModel(UIDataTable.java:120)

                at org.ajax4jsf.component.UIDataAdaptor.getExtendedDataModel(UIDataAdaptor.java:621)

                at org.ajax4jsf.component.UIDataAdaptor.getRowIndex(UIDataAdaptor.java:311)

                at javax.faces.component._ComponentUtils.idsAreEqual(_ComponentUtils.java:134)

                at javax.faces.component._ComponentUtils.findComponent(_ComponentUtils.java:110)

                at javax.faces.component._ComponentUtils.findComponent(_ComponentUtils.java:107)

                at javax.faces.component._ComponentUtils.findComponent(_ComponentUtils.java:107)

                at javax.faces.component._ComponentUtils.findComponent(_ComponentUtils.java:107)

                at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:449)

                at org.ajax4jsf.renderkit.RendererUtils.findUIComponentBelow(RendererUtils.java:912)

                at org.ajax4jsf.renderkit.RendererUtils.findUIComponentBelow(RendererUtils.java:919)

                at org.ajax4jsf.renderkit.RendererUtils.findUIComponentBelow(RendererUtils.java:919)

                at org.ajax4jsf.renderkit.RendererUtils.findUIComponentBelow(RendererUtils.java:919)

                at org.ajax4jsf.renderkit.RendererUtils.findComponentFor(RendererUtils.java:882)

                at org.ajax4jsf.context.AjaxContextImpl.convertId(AjaxContextImpl.java:395)

                at org.ajax4jsf.context.AjaxContextImpl.addRegionsFromComponent(AjaxContextImpl.java:331)

                at org.ajax4jsf.component.AjaxActionComponent.setupReRender(AjaxActionComponent.java:96)

                at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:60)

                at org.ajax4jsf.component.UIInclude.broadcast(UIInclude.java:170)

                at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)

                at org.ajax4jsf.component.AjaxViewRoot.broadcastAjaxEvents(AjaxViewRoot.java:340)

                at org.ajax4jsf.application.AjaxViewHandler.processAjaxEvents(AjaxViewHandler.java:216)

                at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:169)

                at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)

                at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)

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

                ... 29 more

          2011-12-12 16:35:48,342 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception

          java.lang.RuntimeException: IteratedExpression.getItem: Index out of Bounds

                at javax.servlet.jsp.jstl.core.IteratedExpression.getItem(IteratedExpression.java:75)

                at javax.servlet.jsp.jstl.core.IteratedValueExpression.getValue(IteratedValueExpression.java:60)

                at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:64)

                at org.apache.el.parser.AstValue.getValue(AstValue.java:112)

                at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)

                at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)

                at javax.faces.component.UIData.getValue(UIData.java:1081)

                at org.ajax4jsf.component.UIDataAdaptor.getValue(UIDataAdaptor.java:1624)

                at org.ajax4jsf.component.SequenceDataAdaptor.getDataModel(SequenceDataAdaptor.java:65)

                at org.ajax4jsf.component.SequenceDataAdaptor.createDataModel(SequenceDataAdaptor.java:59)

                at org.richfaces.component.UIDataTable.createDataModel(UIDataTable.java:120)

                at org.ajax4jsf.component.UIDataAdaptor.getExtendedDataModel(UIDataAdaptor.java:621)

                at org.ajax4jsf.component.UIDataAdaptor.getRowIndex(UIDataAdaptor.java:311)

                at javax.faces.component._ComponentUtils.idsAreEqual(_ComponentUtils.java:134)

                at javax.faces.component._ComponentUtils.findComponent(_ComponentUtils.java:110)

                at javax.faces.component._ComponentUtils.findComponent(_ComponentUtils.java:107)

                at javax.faces.component._ComponentUtils.findComponent(_ComponentUtils.java:107)

                at javax.faces.component._ComponentUtils.findComponent(_ComponentUtils.java:107)

                at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:449)

                at org.ajax4jsf.renderkit.RendererUtils.findUIComponentBelow(RendererUtils.java:912)

                at org.ajax4jsf.renderkit.RendererUtils.findUIComponentBelow(RendererUtils.java:919)

                at org.ajax4jsf.renderkit.RendererUtils.findUIComponentBelow(RendererUtils.java:919)

                at org.ajax4jsf.renderkit.RendererUtils.findUIComponentBelow(RendererUtils.java:919)

                at org.ajax4jsf.renderkit.RendererUtils.findComponentFor(RendererUtils.java:882)

                at org.ajax4jsf.context.AjaxContextImpl.convertId(AjaxContextImpl.java:395)

                at org.ajax4jsf.context.AjaxContextImpl.addRegionsFromComponent(AjaxContextImpl.java:331)

                at org.ajax4jsf.component.AjaxActionComponent.setupReRender(AjaxActionComponent.java:96)

                at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:60)

                at org.ajax4jsf.component.UIInclude.broadcast(UIInclude.java:170)

                at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)

                at org.ajax4jsf.component.AjaxViewRoot.broadcastAjaxEvents(AjaxViewRoot.java:340)

                at org.ajax4jsf.application.AjaxViewHandler.processAjaxEvents(AjaxViewHandler.java:216)

                at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:169)

                at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)

                at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)

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

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

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

                at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)

                at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

                at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)

                at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

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

                at myPackage.jsfutils.HibernateSessionRequestFilter.doFilter(HibernateSessionRequestFilter.java:45)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

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

                at myPackage.jsfutils.CheckLogonFilter.doFilter(CheckLogonFilter.java:81)

                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:233)

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

                at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)

                at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:406)

                at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)

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

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

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

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

                at org.apache.geronimo.tomcat.valve.ThreadCleanerValve.invoke(ThreadCleanerValve.java:40)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

                at java.lang.Thread.run(Thread.java:619){code}