-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE in ELFlash.get() on first request #4431
Comments
Which version of Mojarra is this targeting? |
@manfredriem originally the issue was found on 2.3.5 version, but it also affects newer versions. Please let me know if those are not the correct branches. |
Getting this error as well |
The PR provided should fix the issue |
Unfortunately the PR didn't pass the IP check :( |
Oh sorry @arjantijms I didn't notice the failure. I'll fix it tomorrow morning |
Thanks a lot! :) |
Signed-off-by: Bartosz Spyrko-Smietanko <[email protected]>
Signed-off-by: Bartosz Spyrko-Smietanko <[email protected]>
Signed-off-by: Bartosz Spyrko-Smietanko <[email protected]>
[#4431] NPE in ELFlash.get() on first request
[#4431] NPE in ELFlash.get() on first request
This is fixed and deployed shouldn't this ticket be closed? |
@arjantijms :) |
Thanks for the ping ;) |
ELFlash.get throws NPE in clustered apps when trying to access flash scope on first request.
Reproducer: test.tar.gz
Steps to reproduce:
Unzip & deploy attached app
curl -i http://localhost:8080/test/getvar.xhtml
Result:
26-Jul-2018 11:06:59.383 SEVERE [http-nio-8080-exec-13] com.sun.faces.application.view.FaceletViewHandlingStrategy.handleRenderException Error Rendering View[/getvar.xhtml] javax.el.ELException: /getvar.xhtml: java.lang.NullPointerException at com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:89) at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:83) at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:211) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1908) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1908) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:491) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:194) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:151) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:126) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:223) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NullPointerException at com.sun.faces.context.flash.ELFlash.get(ELFlash.java:420) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at javax.el.BeanELResolver.invoke(BeanELResolver.java:158) at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:79) at org.apache.el.parser.AstValue.getValue(AstValue.java:159) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190) at com.sun.faces.facelets.el.ELText$ELTextVariable.writeText(ELText.java:258) at com.sun.faces.facelets.el.ELText$ELTextComposite.writeText(ELText.java:165) at com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:86) ... 33 more
Expected:
#{flash.get('var')} should return null since the variable has not been set.
Note: this is a copy of javaserverfaces/mojarra#4379
The text was updated successfully, but these errors were encountered: