0 Replies Latest reply on Aug 25, 2010 4:44 PM by Scott Estabrooks

    listShuttle index out of range

    Scott Estabrooks Newbie

      Hi,

       

      I'm having sporadic problems with the listshuttle, which is being used on a wizard page. The listshuttle source contains 78 items, the target contains 4 items to start with.  I run through the wizard pages 7-8 times without problem, and selecting the same exact wizard options each time.  But somewhere around between the 7th and 9th time, I get a stack trace which seems to point to the listshuttle having an index out of range.  Thereafter, the crash occurs occasionally, but not predictably.  We're running with rich faces 3.3.3 and tomahawk 1.1.9.

       

      Here's the stack trace:

      javax.faces.FacesException: Exception while decoding component : {Component-Path : [Class: org.ajax4jsf.component.AjaxViewRoot,ViewId: /satReportSectionOptions.jsft][Class: javax.faces.component.html.HtmlForm,Id: wizard][Class: javax.faces.component.UINamingContainer,Id: section-options][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id_jsp_479746450_12][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id_jsp_479746450_14][Class: org.richfaces.component.html.HtmlListShuttle,Id: j_id_jsp_479746450_16]}
          at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:583)
          at org.richfaces.component.UIOrderingBaseComponent.decode(UIOrderingBaseComponent.java:232)
          at org.richfaces.component.UIListShuttle.processDecodes(UIListShuttle.java:226)
          at org.ajax4jsf.component.UIDataAdaptorBase.processDecodes(UIDataAdaptorBase.java:1173)
          at org.richfaces.component.UIOrderingBaseComponent.processDecodes(UIOrderingBaseComponent.java:256)
          at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:705)
          at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:705)
          at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:705)
          at javax.faces.component.UIForm.processDecodes(UIForm.java:65)
          at org.ajax4jsf.component.AjaxViewRoot$1.invokeContextCallback(AjaxViewRoot.java:400)
          at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:240)
          at org.ajax4jsf.component.AjaxViewRoot.processDecodes(AjaxViewRoot.java:417)
          at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
          at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
          at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:178)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at com.acopia.common.HomeFilter.doFilter(HomeFilter.java:140)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:341)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
          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.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
          at java.lang.String.substring(String.java:1938)
          at org.richfaces.renderkit.ListShuttleRendererBase.doDecode(ListShuttleRendererBase.java:346)
          at org.ajax4jsf.renderkit.RendererBase.decode(RendererBase.java:75)
          at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:579)
          ... 40 more
      2010-08-25 15:21:26,407 WARN util.DefaultAddResource: MyFaces special javascript could not be retrieved from request-map.

       

      And here is the jsp code:

       

      <h:panelGrid columns="1" rendered="#{page.renderFileGroupsShuttle}" styleClass="borderlessGroup">
              <h:outputText value="File Group Section" style="font-weight: bold;"/>
              <h:panelGrid columns="1" style="margin-left:3em;">
                  <h:outputText value="Group files by the following selected file criteria: "/>
                  <r:listShuttle sourceValue="#{page.sectionOptionsFileCriteriaAvailable}" targetValue="#{page.satReport.fileGroupCriteria}"
                  var="item" converter="FileCriteriaConverter" sourceCaptionLabel="Available" targetCaptionLabel="Selected"
                  showButtonLabels="false" orderControlsVisible="false" fastOrderControlsVisible="false" style="margin-left: 0.5em;">
                      <r:column><h:outputText value="#{item}"/></r:column>
                  </r:listShuttle>
              </h:panelGrid>
          </h:panelGrid>

       

      Any ideas of what I should be looking for?  I think it's something timing related, since it occurs only occasionaly.  I've printed out the size of the list that populates the shuttle in the bean, and it is always 78.  Likewise the target is always 4, so it doesn't appear to be a problem populating the list.  Also, I don't manipulate the list in any way, just select "next" to go the next wizard page.  It crashes when I hit "next".

       

      Thanks,

      ScottE