MyFaces Trinidad
  1. MyFaces Trinidad
  2. TRINIDAD-1962

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

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.12-core
    • Fix Version/s: None
    • Component/s: Components
    • Labels:
      None

      Description

      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

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Brian Jacobsen
          • Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development