glassfish
  1. glassfish
  2. GLASSFISH-17215

"Context is already active" for jsf view with prettyfaces

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: 4.0
    • Component/s: cdi
    • Labels:
      None
    • Environment:

      windows java 6 every version of glashfish

      Description

      When calling url http://localhost:8080/WebApplication1/faces/testAdmin?testid=90 with prettyfaces

      Cause the next exception:

      java.lang.IllegalStateException: Context is already active
      at org.jboss.weld.context.AbstractConversationContext.activate(AbstractConversationContext.java:311)
      at org.jboss.weld.jsf.WeldPhaseListener.activateConversations(WeldPhaseListener.java:110)
      at org.jboss.weld.jsf.WeldPhaseListener.beforePhase(WeldPhaseListener.java:84)
      at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)
      at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:118)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:785)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:649)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:483)
      at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:454)
      at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:350)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:300)
      at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:110)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:785)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:649)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:483)
      at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:454)
      at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:350)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:300)
      at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:546)
      at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:364)
      at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:154)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)
      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.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:118)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
      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).

        Activity

        Hide
        meirka5 added a comment -
        Show
        meirka5 added a comment - http://localhost:8080/WebApplication1/faces/electAdmin?testid=90 for cause the exception
        Hide
        rogerk added a comment -

        Assigning to cdi team for investigation..

        Show
        rogerk added a comment - Assigning to cdi team for investigation..
        Hide
        Sivakumar Thyagarajan added a comment -

        I get the following erros while trying to access the above URL. Transferring to the JSF team for investigation.

        meirka5: could you please provide the project's sources as well?

        [#|2011-12-10T22:53:24.763+0530|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|WEB0671: Loading application EnterpriseTestApplication1#WebApplication1.war at [WebApplication1]|#]

        [#|2011-12-10T22:53:25.057+0530|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=17;_ThreadName=Thread-2;|EnterpriseTestApplication1 was successfully deployed in 5,172 milliseconds.|#]

        [#|2011-12-10T22:54:25.226+0530|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=18;_ThreadName=Thread-2;|StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
        java.lang.NullPointerException
        at com.sun.faces.context.flash.ELFlash.loggingGetPhaseMapForReading(ELFlash.java:793)
        at com.sun.faces.context.flash.ELFlash.getPhaseMapForReading(ELFlash.java:826)
        at com.sun.faces.context.flash.ELFlash.isEmpty(ELFlash.java:484)
        at com.sun.faces.facelets.util.DevTools.writeVariables(DevTools.java:325)
        at com.sun.faces.facelets.util.DevTools.writeVariables(DevTools.java:215)
        at com.sun.faces.facelets.util.DevTools.debugHtml(DevTools.java:130)
        at com.sun.faces.renderkit.RenderKitUtils.renderHtmlErrorPage(RenderKitUtils.java:1162)
        at com.sun.faces.context.ExceptionHandlerImpl.throwIt(ExceptionHandlerImpl.java:276)
        at com.sun.faces.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:142)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
        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:1542)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
        at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:118)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
        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:331)
        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:849)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
        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)

        #]
        Show
        Sivakumar Thyagarajan added a comment - I get the following erros while trying to access the above URL. Transferring to the JSF team for investigation. meirka5: could you please provide the project's sources as well? [#|2011-12-10T22:53:24.763+0530|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|WEB0671: Loading application EnterpriseTestApplication1#WebApplication1.war at [WebApplication1] |#] [#|2011-12-10T22:53:25.057+0530|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=17;_ThreadName=Thread-2;|EnterpriseTestApplication1 was successfully deployed in 5,172 milliseconds.|#] [#|2011-12-10T22:54:25.226+0530|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=18;_ThreadName=Thread-2;|StandardWrapperValve [Faces Servlet] : PWC1406: Servlet.service() for servlet Faces Servlet threw exception java.lang.NullPointerException at com.sun.faces.context.flash.ELFlash.loggingGetPhaseMapForReading(ELFlash.java:793) at com.sun.faces.context.flash.ELFlash.getPhaseMapForReading(ELFlash.java:826) at com.sun.faces.context.flash.ELFlash.isEmpty(ELFlash.java:484) at com.sun.faces.facelets.util.DevTools.writeVariables(DevTools.java:325) at com.sun.faces.facelets.util.DevTools.writeVariables(DevTools.java:215) at com.sun.faces.facelets.util.DevTools.debugHtml(DevTools.java:130) at com.sun.faces.renderkit.RenderKitUtils.renderHtmlErrorPage(RenderKitUtils.java:1162) at com.sun.faces.context.ExceptionHandlerImpl.throwIt(ExceptionHandlerImpl.java:276) at com.sun.faces.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:142) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119) 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:1542) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217) at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:118) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) 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:331) 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:849) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228) 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) #]
        Hide
        rogerk added a comment -

        Risk factor this late in the release.

        Show
        rogerk added a comment - Risk factor this late in the release.
        Hide
        rogerk added a comment -

        This is an old issue that appears to be a Weld issue. However, I will try this with GlassFish 4
        and update the status accordingly.

        Show
        rogerk added a comment - This is an old issue that appears to be a Weld issue. However, I will try this with GlassFish 4 and update the status accordingly.
        Hide
        rogerk added a comment -

        Assign to cdi team. This is an older issue that I believe has to be rewritten by the reporter for Glassfish4.

        Show
        rogerk added a comment - Assign to cdi team. This is an older issue that I believe has to be rewritten by the reporter for Glassfish4.
        Hide
        rogerk added a comment -

        Can you provide another app that is more recent and packaged differently?

        Show
        rogerk added a comment - Can you provide another app that is more recent and packaged differently?

          People

          • Assignee:
            jjsnyder83
            Reporter:
            meirka5
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: