nullpointerexception - What might be the reason for JSF/MyFaces to lose its FacesContext? -


i have webapplication based on jsf(2.1.17) myfaces /primefaces + omnifaces on 8.0.0.9

most of time works ok, following exception:

java.lang.nullpointerexception         @ org.apache.myfaces.shared.context.flash.flashimpl.iskeepmessages(flashimpl.java:388)         @ org.apache.myfaces.shared.context.flash.flashimpl._savemessages(flashimpl.java:668)         @ org.apache.myfaces.shared.context.flash.flashimpl.dopostphaseactions(flashimpl.java:269)         @ org.apache.myfaces.lifecycle.lifecycleimpl.render(lifecycleimpl.java:254)         @ javax.faces.webapp.facesservlet.service(facesservlet.java:199)         @ com.ibm.ws.webcontainer.servlet.servletwrapper.service(servletwrapper.java:1230)         @ com.ibm.ws.webcontainer.servlet.servletwrapper.handlerequest(servletwrapper.java:779)         @ com.ibm.ws.webcontainer.servlet.servletwrapper.handlerequest(servletwrapper.java:478)         @ com.ibm.ws.webcontainer.servlet.servletwrapperimpl.handlerequest(servletwrapperimpl.java:178)         @ com.ibm.ws.webcontainer.filter.webappfilterchain.invoketarget(webappfilterchain.java:136)         @ com.ibm.ws.webcontainer.filter.webappfilterchain.dofilter(webappfilterchain.java:97)         @ org.omnifaces.filter.facesexceptionfilter.dofilter(facesexceptionfilter.java:56)         @ org.omnifaces.filter.httpfilter.dofilter(httpfilter.java:77)         @ com.ibm.ws.webcontainer.filter.filterinstancewrapper.dofilter(filterinstancewrapper.java:195)         @ com.ibm.ws.webcontainer.filter.webappfilterchain.dofilter(webappfilterchain.java:91) 

// ... more filters ...

when looking @ flashimpl line388 if find:

@override public boolean iskeepmessages() {     facescontext facescontext = facescontext.getcurrentinstance();     externalcontext externalcontext = facescontext.getexternalcontext(); //<-- line 388     map<string, object> requestmap = externalcontext.getrequestmap();     boolean keepmessages = (boolean) requestmap.get(flash_keep_messages);      return (keepmessages == null ? boolean.false : keepmessages); } 

so looks there no facescontext. although (again looking @ code) should created in facesservlet.service further call stack.

one of filters have registered logs time used in different phases of jsf lifecycle, , complains phase render_response started, although running.

logging suggesting in current request requested page not found , therefor apropriate error page requested.

all might happen during ajax request not sure.

any ideas might causing problem?

i found this bugreport couldn't find reference getrequestdispatcher doesn't seem apply.

i found question: null pointer exception in flashimpl.java in ibm jsf might duplicate since have more (possibly relevant) information might or might not apply other question thought better create new one.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -