NullPointerException after user session expired when using PrimeFaces
Issue
I use PrimeFaces with my JBoss Enterprise Application Platform (EAP), I found after the user sessions expired / timed out, NullPointerException will happen.
The stacktrace looks like:
00:35:14,943 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/sample].[Faces Servlet]] (ajp-/192.168.0.1:30002-8) Servlet.service() for servlet Faces Servlet threw exception: java.lang.NullPointerException
at com.sun.faces.context.PartialViewContextImpl.createPartialResponseWriter(PartialViewContextImpl.java:443)
at com.sun.faces.context.PartialViewContextImpl.access$300(PartialViewContextImpl.java:72)
at com.sun.faces.context.PartialViewContextImpl$DelayedInitPartialResponseWriter.getWrapped(PartialViewContextImpl.java:577)
at javax.faces.context.PartialResponseWriter.startDocument(PartialResponseWriter.java:115)
at org.primefaces.context.PrimePartialResponseWriter.startDocument(PrimePartialResponseWriter.java:133)
at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:199)
at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:124)
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
- PrimeFaces
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.