1 Reply Latest reply on Aug 4, 2013 6:56 AM by Frank Langelage

    new StringIndexOutOfBoundsException in JSF web-app

    Frank Langelage Master

      With latest source from github.com I get a StringIndexOutOfBoundsException all time in my web app.

      For me this seem to be a bug, as I did not have this problem some days ago.

      Running the same code on a Alpha2 build from end of June the problem does not appear.

       

      This happen when clicking on any of my menu entries in /index.html.

       

      Extract from web-faces-config.xml:

      <!-- Navigation TreeMenu -->
      <navigation-rule>
          <from-view-id>/index.xhtml</from-view-id>
          <navigation-case>
              <from-outcome>AUFTRAGSSUCHE</from-outcome>
              <to-view-id>#{salesOrders.start()}</to-view-id>
          </navigation-case>

      ...

       

      Stacktrace:

      21:06:11,476 FINE  [javax.faces.component#getRenderer] No renderer-type for component javax_faces_location_HEAD

      21:06:11,484 FINE  [javax.faces.component#getRenderer] No renderer-type for component j_id1

      21:06:11,486 FINE  [javax.faces.component#getRenderer] No renderer-type for component openFacesValidationProcessor

      21:06:22,653 FINE  [javax.faces.component#getRenderer] No renderer-type for component j_id1

      21:06:22,731 FINE  [javax.faces.component#getRenderer] No renderer-type for component javax_faces_location_HEAD

      21:06:22,851 FINE  [javax.faces.component#getRenderer] No renderer-type for component j_id2

      21:06:22,853 FINE  [javax.faces.component#getRenderer] No renderer-type for component j_id3

      21:06:22,855 FINE  [javax.faces.component#getRenderer] No renderer-type for component j_id4

      21:06:22,857 FINE  [javax.faces.component#getRenderer] No renderer-type for component j_id5

      21:06:23,433 WARNING [javax.enterprise.resource.webcontainer.jsf.lifecycle#execute] String index out of range: 0: java.lang.StringIndexOutOfBoundsException: String index out of range: 0

          at java.lang.String.charAt(String.java:658) [rt.jar:1.7.0_40-ea]

          at javax.faces.application.NavigationCase.getToViewId(NavigationCase.java:311) [jboss-jsf-api_2.2_spec-2.2.1.jar:2.2.1]

          at com.sun.faces.application.NavigationHandlerImpl.determineViewFromActionOutcome(NavigationHandlerImpl.java:1165) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at com.sun.faces.application.NavigationHandlerImpl.findExactMatch(NavigationHandlerImpl.java:565) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at com.sun.faces.application.NavigationHandlerImpl.getViewId(NavigationHandlerImpl.java:459) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at com.sun.faces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:189) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at com.sun.faces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:182) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:132) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at javax.faces.component.UICommand.broadcast(UICommand.java:315) [jboss-jsf-api_2.2_spec-2.2.1.jar:2.2.1]

          at com.sun.faces.facelets.component.UIRepeat.broadcast(UIRepeat.java:927) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790) [jboss-jsf-api_2.2_spec-2.2.1.jar:2.2.1]

          at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282) [jboss-jsf-api_2.2_spec-2.2.1.jar:2.2.1]

          at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646) [jboss-jsf-api_2.2_spec-2.2.1.jar:2.2.1]

          at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:87) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:136) [undertow-websockets-jsr-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:136) [undertow-websockets-jsr-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:82) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)

          at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:115) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:55) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:65) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:70) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at org.wildfly.extension.undertow.security.SecurityContextCreationHandler.handleRequest(SecurityContextCreationHandler.java:54)

          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:197) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:184) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:59) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:119) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.server.HttpHandlers.executeRootHandler(HttpHandlers.java:36) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:629) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40-ea]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40-ea]

          at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40-ea]

       

      21:06:23,743 FATAL [javax.enterprise.resource.webcontainer.jsf.context#log] JSF1073: javax.faces.FacesException caught during processing of INVOKE_APPLICATION 5 : UIComponent-ClientId=, Message=String index out of range: 0

      21:06:23,745 FATAL [javax.enterprise.resource.webcontainer.jsf.context#log] String index out of range: 0: javax.faces.FacesException: String index out of range: 0

          at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:89) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646) [jboss-jsf-api_2.2_spec-2.2.1.jar:2.2.1]

          at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:87) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:136) [undertow-websockets-jsr-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:136) [undertow-websockets-jsr-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:82) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)

          at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:115) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:55) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:65) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:70) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at org.wildfly.extension.undertow.security.SecurityContextCreationHandler.handleRequest(SecurityContextCreationHandler.java:54)

          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:197) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:184) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:59) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:119) [undertow-servlet-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.server.HttpHandlers.executeRootHandler(HttpHandlers.java:36) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:629) [undertow-core-1.0.0.Beta5.jar:1.0.0.Beta5]

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40-ea]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40-ea]

          at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40-ea]

      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0

          at java.lang.String.charAt(String.java:658) [rt.jar:1.7.0_40-ea]

          at javax.faces.application.NavigationCase.getToViewId(NavigationCase.java:311) [jboss-jsf-api_2.2_spec-2.2.1.jar:2.2.1]

          at com.sun.faces.application.NavigationHandlerImpl.determineViewFromActionOutcome(NavigationHandlerImpl.java:1165) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at com.sun.faces.application.NavigationHandlerImpl.findExactMatch(NavigationHandlerImpl.java:565) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at com.sun.faces.application.NavigationHandlerImpl.getViewId(NavigationHandlerImpl.java:459) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at com.sun.faces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:189) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at com.sun.faces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:182) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:132) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at javax.faces.component.UICommand.broadcast(UICommand.java:315) [jboss-jsf-api_2.2_spec-2.2.1.jar:2.2.1]

          at com.sun.faces.facelets.component.UIRepeat.broadcast(UIRepeat.java:927) [jsf-impl-2.2.1-jbossorg-1.jar:]

          at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790) [jboss-jsf-api_2.2_spec-2.2.1.jar:2.2.1]

          at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282) [jboss-jsf-api_2.2_spec-2.2.1.jar:2.2.1]

          at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.2.1-jbossorg-1.jar:]

          ... 35 more