chkal/pf-issue-test — Issue #88: Null pointer exception
Author: chkal
Created: 2012-03-06 07:31:54+00:00
State: open

Originally filed by **giorgiof...@gmail.com** on 2011-02-23T12:53:47

Google Code issue: http://code.google.com/p/prettyfaces/issues/detail?id=90

I have a strange error using Pretty Faces.
The error is:
HTTP 500
type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.NullPointerException

It is quite strange because it was working. I moved from Netbeans 7.0 beta to beta2 and now it is giving this problem. Same application server (now its is glassfish 3.1 b41, old version should be b29, but i'm not sure)

In the server log I found this:
GRAVE: WebModule[/px]PWC1321: Error invoking requestInitialized method on ServletRequestListener com.ocpsoft.pretty.faces.config.PrettyConfigListener
java.lang.NullPointerException
at com.sun.faces.application.ServletContextSensitiveSingletonStore.(ServletContextSensitiveSingletonStore.java:83)
at com.sun.faces.application.ApplicationFactoryImpl.getApplication(ApplicationFactoryImpl.java:92)
at com.ocpsoft.pretty.faces.util.FacesFactory.getApplication(FacesFactory.java:31)
at com.ocpsoft.pretty.faces.config.PrettyConfigListener.requestInitialized(PrettyConfigListener.java:34)
at org.apache.catalina.core.StandardContext.fireRequestInitializedEvent(StandardContext.java:4551)
at org.apache.catalina.core.StandardHostValve.preInvoke(StandardHostValve.java:626)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)

I tried to remove the Pretty faces jar from the project, and it works.
I tried also with Pretty faces 3.1.0, but I had the same error.

It seems to be a sort of incompatibility with the mojarra version that now glassfish is using (Mojarra 2.1.0 (FCS 2.1.0-b11).