You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Brian Jacobsen (JIRA)" <de...@myfaces.apache.org> on 2010/11/19 10:46:13 UTC

[jira] Created: (TRINIDAD-1962) NullPointerException in RenderKitDecorator when redirecting to errorpage as set up in web.xml

NullPointerException in RenderKitDecorator when redirecting to errorpage as set up in web.xml <error-page>
----------------------------------------------------------------------------------------------------------

                 Key: TRINIDAD-1962
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1962
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components
    Affects Versions:  1.2.12-core
            Reporter: Brian Jacobsen


Using the redirection mechanism in web.xml

	<error-page>
		<error-code>500</error-code>
		<location>/pages/500.xhtml</location>
	</error-page>

to redirect the user in case of server side error causes a NullPointerException in RenderKitDecorator

####<18-11-2010 15:22:08 CET> <Error> <HTTP> <xxxxxx> <AdminServer> <[ACTIVE] ExecuteThread: '16' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1290090128960> <BEA-101107> <[ServletContext@26871663[app:sagsportal_Ear_exploded module:sagsportal path:/sagsportal spec-version:2.5]] Problem occurred while serving the error page.
java.lang.NullPointerException
	at org.apache.myfaces.trinidadinternal.renderkit.RenderKitDecorator.getRenderKit(RenderKitDecorator.java:119)
	at org.apache.myfaces.trinidadinternal.renderkit.RenderKitDecorator.getResponseStateManager(RenderKitDecorator.java:70)
	at com.sun.faces.renderkit.RenderKitUtils.getResponseStateManager(RenderKitUtils.java:233)
	at com.sun.faces.lifecycle.RestoreViewPhase.isPostback(RestoreViewPhase.java:265)
	at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:175)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
	at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:102)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
	at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
	at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:499)
	at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:248)
	at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:745)
	at weblogic.servlet.internal.ErrorManager.handleException(ErrorManager.java:181)
	at weblogic.servlet.internal.WebAppServletContext.handleThrowableFromInvocation(WebAppServletContext.java:2266)
	at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2115)
	at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
	at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
	at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
> 

The problem is that

RequestContext.getCurrentInstance() in the following line returns null when redirecting to the error page.

ConcurrentMap<String, Object> appMap = 
                         RequestContext.getCurrentInstance().getApplicationScopedConcurrentMap();
    
This is broken in 1.2.12, 1.2.13 and the latest 1.2.x, works in 1.2.11

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.