chkal/pf-issue-test — Issue #7: In 1.2.3_RC1, getActionUrl fails with NPE on non "pretty request".
Author: chkal
Created: 2012-03-06 07:14:16+00:00
State: open

Originally filed by **kasc...@mail.nih.gov** on 2009-03-23T13:03:21

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

In 1.2.2 I didn't have this problem.... I just dropped in 1.2.3_RC1 with
no changes to my code and now I receive a NullPointerException.

In this situation, it looks like getActionURL in the view handler is
checking whether teh request is a "pretty request" and it's not.... but
isPrettyRequest is trying to access the PrettyConfig which is null because
the PrettyFilter didn't match the URL and therefore didnt create the
PrettyConfig.

java.lang.NullPointerException
at com.ocpsoft.pretty.PrettyContext.isPrettyRequest
(PrettyContext.java:175)
at com.ocpsoft.pretty.application.PrettyViewHandler.getActionURL
(PrettyViewHandler.java:68)
at com.sun.facelets.FaceletViewHandler.getActionURL
(FaceletViewHandler.java:803)
at com.sun.faces.renderkit.html_basic.FormRenderer.getActionStr
(FormRenderer.java:195)
at com.sun.faces.renderkit.html_basic.FormRenderer.encodeBegin
(FormRenderer.java:127)
at javax.faces.component.UIComponentBase.encodeBegin
(UIComponentBase.java:813)
at javax.faces.component.UIComponent.encodeAll
(UIComponent.java:928)
at javax.faces.component.UIComponent.encodeAll
(UIComponent.java:933)
at javax.faces.component.UIComponent.encodeAll
(UIComponent.java:933)
at com.sun.facelets.FaceletViewHandler.renderView
(FaceletViewHandler.java:592)
at com.sun.faces.lifecycle.RenderResponsePhase.execute
(RenderResponsePhase.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render
(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)