-1

I have a JSF 2.0 project with PrimeFaces 3.0.0.M3 on Glassfish.

When I run it, I get the following exception:

java.lang.NullPointerException
    at com.sun.faces.renderkit.RenderKitImpl.createResponseWriter(RenderKitImpl.java:228)
    at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:214)
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
    at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
    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)
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Cetin Imre
  • 331
  • 1
  • 8
  • 15
  • Just wondering, why are you using JSP instead of Facelets? Please provide the view code. – BalusC Sep 27 '11 at 18:40
  • And guys I have a other problem. when I use @ManagedBean ,I dont reach the bean from the page, what may it caused by?What is the Differences between JSP and Facelsets – Cetin Imre Sep 27 '11 at 18:50
  • 1
    One problem at a time please. For a new problem, just ask new question. As to the current problem, please edit your question to include the view code causing this problem. Please also confirm if you're really using JSP instead of Facelets (the stacktrace namely hints that and PrimeFaces doesn't support JSP views). – BalusC Sep 27 '11 at 18:51

1 Answers1

3

Given the following line,

at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:214)

I assume that you're actually using the legacy JSP instead of its successor Facelets as view technology (if you were using Facelets, you would have seen FaceletViewHandlingStrategy here).

JSF 2.x at its own works fine on JSP, but the PrimeFaces component library does not support JSP anymore since PrimeFaces 2.2 for various reasons (it boils down to "not worth the maintenance effort"). If you want to use PrimeFaces 3.0, you need to upgrade to Facelets. Facelets is a XML based view technology which offers enormous a lot of advantages over JSP. It's already bundled as default view technology in JSF 2.x, you do not need to install or configure anything separately.

See also:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555