Project: Tomcat
Bug 51088 ArrayIndexOutOfBoundsException from org.apache.el.parser.JJTELParserState
Reported: 2011-04-20 05:42:42 | Status: resolved wontfix

I found the following ArrayIndexOutOfBoundsException in my logfile. It occurred directly after login into my webApp without any further user interaction. Unfortunately it is not reproducible at all. I am not sure whether Jasper is the right component. However the class JJTELParserState is in the jasper-el.jar. Environment: Tomcat 6.0.32 Facelets 1.1.14 Myfaces 1.2.9 SCHWERWIEGEND: Error Rendering View[/facelets/myview.xhtml] java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.remove(ArrayList.java:390) at org.apache.el.parser.JJTELParserState.closeNodeScope(JJTELParserState.java:108) at org.apache.el.parser.ELParser.CompositeExpression(ELParser.java:74) at org.apache.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:115) at org.apache.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:172) at org.apache.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:216) at org.apache.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:68) at com.sun.facelets.el.ELText$ELTextVariable.apply(ELText.java:161) at com.sun.facelets.compiler.AttributeInstruction.apply(AttributeInstruction.java:60) at com.sun.facelets.compiler.UIInstructionHandler.apply(UIInstructionHandler.java:95) at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) at com.sun.facelets.tag.jstl.core.IfHandler.apply(IfHandler.java:54) at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360) at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190) at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360) at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190) at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360) at org.apache.myfaces.custom.aliasbean.AliasBeansScopeTagHandler.applyNextHandler(AliasBeansScopeTagHandler.java:52) at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190) at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:124) at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49) at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:39) at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248) at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294) at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273) at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140) at com.sun.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:66) at com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64) at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:136) at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:337) at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:307) at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68) at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360) at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190) at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360) at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190) at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:124) at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49) at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:39) at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248) at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294) at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273) at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140) at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:116) at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49) at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:39) at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95) at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:596) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:651) at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100) at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176) at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140) at org.apache.myfaces.custom.ppr.PPRLifecycleWrapper.render(PPRLifecycleWrapper.java:84) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:187) at com.foo..client.web.servlets.FacesServletWrapper.service(FacesServletWrapper.java:125) 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: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.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:392) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.foo..client.web.filters.LoginFilter.doFilter(LoginFilter.java:219) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.foo..client.web.filters.CacheFilter.doFilter(CacheFilter.java:110) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.foo..client.web.filters.EncodingFilter.doFilter(EncodingFilter.java:54) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.foo..client.web.filters.TimerFilter.doFilter(TimerFilter.java:80) 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:470) 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.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) 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:662)

Files changed in fix:
java/org/apache/el/lang/ExpressionBuilder.java