ICEfaces
  1. ICEfaces
  2. ICE-3577

Server Push not working with Seam and JSF1.2-09

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.7.1
    • Fix Version/s: 1.7.2
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Seam 2.1 trunk, 2.0.2.SP1 with JBoss 4.2.3 (JSF 1.2_09)

      Description

      There is a problem with using Seam on JBoss 4.2.3 and ICEfaces 1.7.1 as server-push does not work reliably.

      We believe the problem for seam-auctionMonitor rests with 4.2.3.GA Application Server, specifically JSF1.2_09 runtime (it's all good on 4.2.2.GA).

      Tested:

        * 2.1Trunk with ICEfaces-1.7.2
        * 2.0.2.SP1 with ICefaces-1.7.2
        * 2.0.2.SP1 with ICEfaces-1.7.1

              All give the following exception:-

      11:10:58,276 ERROR [SeamPhaseListener] uncaught exception
      java.lang.IllegalStateException: No active application scope
        at org.jboss.seam.core.Init.instance(Init.java:76)
        at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:314)
        at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
        at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
        at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:214)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:96)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:189)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:373)
        at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:143)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Unknown Source)
      11:10:58,276 ERROR [SeamPhaseListener] swallowing exception
      java.lang.IllegalStateException: No active application scope
        at org.jboss.seam.core.Init.instance(Init.java:76)
        at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:314)
        at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
        at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
        at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:214)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:96)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:189)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:373)
        at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:143)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Unknown Source)
      11:10:58,276 ERROR [D2DFaceletViewHandler] Problem in renderResponse: No active application context
      java.lang.IllegalStateException: No active application context
        at org.jboss.seam.navigation.Pages.instance(Pages.java:615)
        at org.jboss.seam.ui.util.ViewUrlBuilder.<init>(ViewUrlBuilder.java:27)
        at org.jboss.seam.ui.component.UISeamCommandBase.getUrl(UISeamCommandBase.java:49)
        at org.jboss.seam.ui.renderkit.LinkRendererBase.doEncodeBegin(LinkRendererBase.java:26)
        at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)
        at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813)
        at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:350)
        at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:92)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
        at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:352)
        at com.icesoft.faces.renderkit.dom_html_basic.GridRenderer.encodeChildren(GridRenderer.java:203)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:550)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
        at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
        at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:161)
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:189)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:373)
        at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:143)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Unknown Source)
      11:10:58,292 ERROR [lifecycle] JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /bidView.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@786a44]
      11:10:58,292 ERROR [SeamPhaseListener] uncaught exception
      java.lang.IllegalStateException: No active application scope
        at org.jboss.seam.core.Init.instance(Init.java:76)
        at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:330)
        at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:241)
        at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:192)
        at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:189)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:373)
        at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:143)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Unknown Source)
      11:10:58,292 ERROR [SeamPhaseListener] swallowing exception
      java.lang.IllegalStateException: No active application scope
        at org.jboss.seam.core.Init.instance(Init.java:76)
        at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:330)
        at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:241)
        at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:192)
        at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:189)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:373)
        at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:143)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Unknown Source)
      11:10:58,292 INFO [View] View: FatalRenderingException com.icesoft.faces.webapp.xmlhttp.FatalRenderingException: fatal render failure for viewNumber 2
      11:10:58,292 INFO [View] CLEANUP the renderable list


      On jboss-4.2.2.GA:-
      With 1.7.1 and Seam-2.0.2.SP1:- no problems with anything
      ICefaces-1.7.2 and Seam-2.0.2.SP1:- problems with occasionally losing the conversation (about every 20th bid or so) and the occasional problem with (transaction-related)exception below:
      ICEfaces-1.7.2 and 2.1Trunk:-Still trying to get it to work!! I would suggest that I start with the problems of ICEfaces-1.72 and Seam-2.0.2.SP1 though. Perhaps someone else could look at ICEfaces-1.7.1 and Seam-2.0.2.SP1 (that would show/resolve the issues with jsf-1.2_09)

      12:01:16,487 ERROR [SeamPhaseListener] uncaught exception
      java.lang.IllegalStateException: Could not commit transaction
        at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:613)
        at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:341)
        at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:241)
        at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:192)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.execute(PersistentFacesState.java:237)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:264)
        at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:143)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Unknown Source)
      Caused by: java.util.EmptyStackException
        at java.util.Stack.peek(Unknown Source)
        at org.jboss.seam.transaction.SeSynchronizations.beforeTransactionCommit(SeSynchronizations.java:50)
        at org.jboss.seam.transaction.UTTransaction.commit(UTTransaction.java:49)
        at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:603)
        ... 11 more
      12:01:16,502 ERROR [SeamPhaseListener] uncaught exception
      java.lang.IllegalStateException: No active application scope
        at org.jboss.seam.core.Init.instance(Init.java:76)
        at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:314)
        at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
        at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:177)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:265)
        at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:143)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Unknown Source)
      12:01:16,502 ERROR [SeamPhaseListener] swallowing exception
      java.lang.IllegalStateException: No active application scope
        at org.jboss.seam.core.Init.instance(Init.java:76)
        at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:314)
        at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
        at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:177)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:265)
        at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:143)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Unknown Source)
      12:01:16,502 ERROR [D2DFaceletViewHandler] Problem in renderResponse: No active application context
      java.lang.IllegalStateException: No active application context
        at org.jboss.seam.navigation.Pages.instance(Pages.java:615)
        at org.jboss.seam.ui.util.ViewUrlBuilder.<init>(ViewUrlBuilder.java:27)
        at org.jboss.seam.ui.component.UISeamCommandBase.getUrl(UISeamCommandBase.java:49)
        at org.jboss.seam.ui.renderkit.LinkRendererBase.doEncodeBegin(LinkRendererBase.java:26)
        at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)
        at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
        at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:350)
        at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:92)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
        at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:352)
        at com.icesoft.faces.renderkit.dom_html_basic.GridRenderer.encodeChildren(GridRenderer.java:203)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:571)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
        at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
        at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:159)
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:177)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:265)
        at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:143)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Unknown Source)
      12:01:16,502 WARN [lifecycle] executePhase(RENDER_RESPONSE 6,com.icesoft.faces.context.BridgeFacesContext@147afda) threw exception
      javax.faces.FacesException: Problem in renderResponse: No active application context
        at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:294)
        at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:159)
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:177)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:265)
        at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:143)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.IllegalStateException: No active application context
        at org.jboss.seam.navigation.Pages.instance(Pages.java:615)
        at org.jboss.seam.ui.util.ViewUrlBuilder.<init>(ViewUrlBuilder.java:27)
        at org.jboss.seam.ui.component.UISeamCommandBase.getUrl(UISeamCommandBase.java:49)
        at org.jboss.seam.ui.renderkit.LinkRendererBase.doEncodeBegin(LinkRendererBase.java:26)
        at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)
        at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
        at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:350)
        at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:92)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
        at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:352)
        at com.icesoft.faces.renderkit.dom_html_basic.GridRenderer.encodeChildren(GridRenderer.java:203)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:571)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
        at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
        ... 10 more
      12:01:16,518 ERROR [SeamPhaseListener] uncaught exception
      java.lang.IllegalStateException: No active application scope
        at org.jboss.seam.core.Init.instance(Init.java:76)
        at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:330)
        at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:241)
        at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:192)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:177)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:265)
        at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:143)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Unknown Source)
      12:01:16,518 ERROR [SeamPhaseListener] swallowing exception
      java.lang.IllegalStateException: No active application scope
        at org.jboss.seam.core.Init.instance(Init.java:76)
        at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:330)
        at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:241)
        at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:192)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:177)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:265)
        at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:143)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Unknown Source)
      12:01:16,518 INFO [View] View: FatalRenderingException com.icesoft.faces.webapp.xmlhttp.FatalRenderingException: fatal render failure for viewNumber 2
      12:01:16,518 INFO [View] CLEANUP the renderable list


      ICEfaces-1.7.2 and Seam-2.1.Trunk:-

        Activity

        Hide
        Ted Goddard added a comment -

        Commenting out the push in the test case (but clicking rapidly) still causes the exception to occur:

        10:58:52,096 INFO [STDOUT] Executor execute/render com.icesoft.faces.context.BridgeFacesContext@f8d6a6 Thread[http-10.18.39.59-8080-4,5,jboss]
        10:58:52,192 INFO [PushTest] incrementing counter
        10:58:52,194 INFO [ApplicationCounter] incrementing counter to:-30
        10:58:52,198 INFO [ApplicationCounter] skiping push
        10:58:52,841 INFO [PushTest] removing view once conversation has expired
        10:58:52,841 INFO [PushTest] CLEANUP the renderable list
        10:58:52,842 INFO [PushTest] removing conversationId=7 from application
        10:58:52,843 WARN [GroupAsyncRenderer] TESTGROUP does not contain com.icesoft.esb.PushTest@12c7887
        10:58:52,852 INFO [STDOUT] Executor execute/render com.icesoft.faces.context.BridgeFacesContext@f8d6a6 Thread[http-10.18.39.59-8080-4,5,jboss]
        10:58:52,855 INFO [STDOUT] Executor execute/render com.icesoft.faces.context.BridgeFacesContext@f8d6a6 Thread[http-10.18.39.59-8080-3,5,jboss]
        10:58:52,888 INFO [PushTest] incrementing counter
        10:58:52,890 INFO [ApplicationCounter] incrementing counter to:-31
        10:58:52,890 INFO [ApplicationCounter] skiping push
        10:58:52,931 INFO [PushTest] removing view once conversation has expired
        10:58:52,931 INFO [PushTest] CLEANUP the renderable list
        10:58:52,931 INFO [PushTest] removing conversationId=8 from application
        10:58:52,933 WARN [GroupAsyncRenderer] TESTGROUP does not contain com.icesoft.esb.PushTest@14d3b51
        10:58:52,941 INFO [STDOUT] Executor execute/render com.icesoft.faces.context.BridgeFacesContext@f8d6a6 Thread[http-10.18.39.59-8080-3,5,jboss]
        10:58:52,943 INFO [STDOUT] Executor execute/render com.icesoft.faces.context.BridgeFacesContext@f8d6a6 Thread[http-10.18.39.59-8080-2,5,jboss]
        10:58:52,988 INFO [PushTest] incrementing counter
        10:58:52,989 INFO [ApplicationCounter] incrementing counter to:-32
        10:58:52,990 INFO [ApplicationCounter] skiping push
        10:58:53,050 ERROR [SeamPhaseListener] uncaught exception
        java.lang.IllegalStateException: Could not commit transaction
        at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:613)

        Show
        Ted Goddard added a comment - Commenting out the push in the test case (but clicking rapidly) still causes the exception to occur: 10:58:52,096 INFO [STDOUT] Executor execute/render com.icesoft.faces.context.BridgeFacesContext@f8d6a6 Thread [http-10.18.39.59-8080-4,5,jboss] 10:58:52,192 INFO [PushTest] incrementing counter 10:58:52,194 INFO [ApplicationCounter] incrementing counter to:-30 10:58:52,198 INFO [ApplicationCounter] skiping push 10:58:52,841 INFO [PushTest] removing view once conversation has expired 10:58:52,841 INFO [PushTest] CLEANUP the renderable list 10:58:52,842 INFO [PushTest] removing conversationId=7 from application 10:58:52,843 WARN [GroupAsyncRenderer] TESTGROUP does not contain com.icesoft.esb.PushTest@12c7887 10:58:52,852 INFO [STDOUT] Executor execute/render com.icesoft.faces.context.BridgeFacesContext@f8d6a6 Thread [http-10.18.39.59-8080-4,5,jboss] 10:58:52,855 INFO [STDOUT] Executor execute/render com.icesoft.faces.context.BridgeFacesContext@f8d6a6 Thread [http-10.18.39.59-8080-3,5,jboss] 10:58:52,888 INFO [PushTest] incrementing counter 10:58:52,890 INFO [ApplicationCounter] incrementing counter to:-31 10:58:52,890 INFO [ApplicationCounter] skiping push 10:58:52,931 INFO [PushTest] removing view once conversation has expired 10:58:52,931 INFO [PushTest] CLEANUP the renderable list 10:58:52,931 INFO [PushTest] removing conversationId=8 from application 10:58:52,933 WARN [GroupAsyncRenderer] TESTGROUP does not contain com.icesoft.esb.PushTest@14d3b51 10:58:52,941 INFO [STDOUT] Executor execute/render com.icesoft.faces.context.BridgeFacesContext@f8d6a6 Thread [http-10.18.39.59-8080-3,5,jboss] 10:58:52,943 INFO [STDOUT] Executor execute/render com.icesoft.faces.context.BridgeFacesContext@f8d6a6 Thread [http-10.18.39.59-8080-2,5,jboss] 10:58:52,988 INFO [PushTest] incrementing counter 10:58:52,989 INFO [ApplicationCounter] incrementing counter to:-32 10:58:52,990 INFO [ApplicationCounter] skiping push 10:58:53,050 ERROR [SeamPhaseListener] uncaught exception java.lang.IllegalStateException: Could not commit transaction at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:613)
        Hide
        Ted Goddard added a comment -

        Putting this change back appears to fix the single user, no push case, but the exception may remain when push is used in the application.

        Index: src/com/icesoft/faces/webapp/http/core/ViewBoundServer.java
        ===================================================================
        — src/com/icesoft/faces/webapp/http/core/ViewBoundServer.java (revision 17428)
        +++ src/com/icesoft/faces/webapp/http/core/ViewBoundServer.java (working copy)
        @@ -46,6 +46,7 @@
        // via the updateOnXMLHttpRequest method on the view. Further, once HTTP-1
        // releases the monitor and HTTP-2 gets it, the outbound thread can
        // clear the requestMap member variable via view.release() below
        +synchronized(view.getFacesContext()) {
        try

        { view.updateOnXMLHttpRequest(request); sessionMonitor.touchSession(); @@ -66,6 +67,7 @@ }

        finally

        { view.release(); }

        +}
        }
        }
        }

        Show
        Ted Goddard added a comment - Putting this change back appears to fix the single user, no push case, but the exception may remain when push is used in the application. Index: src/com/icesoft/faces/webapp/http/core/ViewBoundServer.java =================================================================== — src/com/icesoft/faces/webapp/http/core/ViewBoundServer.java (revision 17428) +++ src/com/icesoft/faces/webapp/http/core/ViewBoundServer.java (working copy) @@ -46,6 +46,7 @@ // via the updateOnXMLHttpRequest method on the view. Further, once HTTP-1 // releases the monitor and HTTP-2 gets it, the outbound thread can // clear the requestMap member variable via view.release() below +synchronized(view.getFacesContext()) { try { view.updateOnXMLHttpRequest(request); sessionMonitor.touchSession(); @@ -66,6 +67,7 @@ } finally { view.release(); } +} } } }
        Hide
        Ted Goddard added a comment -

        With the above synchronization and push used by the application, the exception is now different:

        11:31:59,752 INFO [ApplicationCounter] am incrementing counter to:-24
        11:31:59,799 INFO [STDOUT] Executor execute/render com.icesoft.faces.context.BridgeFacesContext@1183a79 Thread[http-10.18.39.59-8080-1,5,jboss]
        11:31:59,816 INFO [STDOUT] PFS execute/render com.icesoft.faces.context.BridgeFacesContext@1183a79 Thread[Render Thread - 0,5,jboss]
        11:31:59,816 INFO [STDOUT] PFState locking edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock@d7c147[Locked by thread Render Thread - 0]
        11:31:59,820 INFO [STDOUT] PFState locking edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock@d7c147[Unlocked]
        11:31:59,836 INFO [STDOUT] PFState locking edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock@d7c147[Locked by thread Render Thread - 0]
        11:31:59,846 INFO [STDOUT] View locking edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock@d7c147[Locked by thread Render Thread - 0]
        11:31:59,905 INFO [STDOUT] PFS execute/render com.icesoft.faces.context.BridgeFacesContext@1183a79 Thread[Render Thread - 0,5,jboss]
        11:31:59,920 INFO [STDOUT] PFS execute/render com.icesoft.faces.context.BridgeFacesContext@1183a79 Thread[Render Thread - 2,5,jboss]
        11:31:59,920 INFO [STDOUT] PFState locking edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock@d7c147[Locked by thread Render Thread - 2]
        11:31:59,946 INFO [STDOUT] View locking edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock@d7c147[Locked by thread http-10.18.39.59-8080-2]
        11:31:59,946 INFO [STDOUT] Executor execute/render com.icesoft.faces.context.BridgeFacesContext@1183a79 Thread[http-10.18.39.59-8080-2,5,jboss]
        11:31:59,947 ERROR [SeamPhaseListener] uncaught exception
        java.lang.IllegalStateException: No active application scope
        at org.jboss.seam.core.Init.instance(Init.java:76)
        at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:314)
        at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
        at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
        at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:20)
        at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:44)
        at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:35)
        at com.icesoft.faces.webapp.http.core.ViewBoundServer.service(ViewBoundServer.java:53)
        at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:26)
        at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
        at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:161)
        at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:38)
        at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
        at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
        at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:55)
        at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:19)
        at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
        at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:91)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
        at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
        at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
        at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
        at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
        at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
        at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
        at java.lang.Thread.run(Thread.java:619)

        Show
        Ted Goddard added a comment - With the above synchronization and push used by the application, the exception is now different: 11:31:59,752 INFO [ApplicationCounter] am incrementing counter to:-24 11:31:59,799 INFO [STDOUT] Executor execute/render com.icesoft.faces.context.BridgeFacesContext@1183a79 Thread [http-10.18.39.59-8080-1,5,jboss] 11:31:59,816 INFO [STDOUT] PFS execute/render com.icesoft.faces.context.BridgeFacesContext@1183a79 Thread [Render Thread - 0,5,jboss] 11:31:59,816 INFO [STDOUT] PFState locking edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock@d7c147 [Locked by thread Render Thread - 0] 11:31:59,820 INFO [STDOUT] PFState locking edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock@d7c147 [Unlocked] 11:31:59,836 INFO [STDOUT] PFState locking edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock@d7c147 [Locked by thread Render Thread - 0] 11:31:59,846 INFO [STDOUT] View locking edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock@d7c147 [Locked by thread Render Thread - 0] 11:31:59,905 INFO [STDOUT] PFS execute/render com.icesoft.faces.context.BridgeFacesContext@1183a79 Thread [Render Thread - 0,5,jboss] 11:31:59,920 INFO [STDOUT] PFS execute/render com.icesoft.faces.context.BridgeFacesContext@1183a79 Thread [Render Thread - 2,5,jboss] 11:31:59,920 INFO [STDOUT] PFState locking edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock@d7c147 [Locked by thread Render Thread - 2] 11:31:59,946 INFO [STDOUT] View locking edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock@d7c147 [Locked by thread http-10.18.39.59-8080-2] 11:31:59,946 INFO [STDOUT] Executor execute/render com.icesoft.faces.context.BridgeFacesContext@1183a79 Thread [http-10.18.39.59-8080-2,5,jboss] 11:31:59,947 ERROR [SeamPhaseListener] uncaught exception java.lang.IllegalStateException: No active application scope at org.jboss.seam.core.Init.instance(Init.java:76) at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:314) at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140) at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144) at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:20) at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:44) at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:35) at com.icesoft.faces.webapp.http.core.ViewBoundServer.service(ViewBoundServer.java:53) at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:26) at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24) at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:161) at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:38) at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19) at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63) at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:55) at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:19) at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23) at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:91) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:619)
        Hide
        Ted Goddard added a comment -

        Adding the synchronization below eliminates the Seam exceptions, but leads to deadlock. Removing
        the .lock() calls also eliminates the deadlock (so with the changes below, the test application runs
        with no exceptions). Understanding how the locking below is functionally different from the lifecycleLock
        code should allow us to change where the lifecycleLock is acquired and achieve the same result but with the
        more flexible locking API. Note that synchronized(facesContext) still appears in some locations in the
        current code, so that may be a source of problems.

        Index: src/com/icesoft/faces/context/View.java
        ===================================================================
        — src/com/icesoft/faces/context/View.java (revision 17428)
        +++ src/com/icesoft/faces/context/View.java (working copy)
        @@ -95,7 +95,8 @@
        }

        private void acquireLifecycleLock()

        { - lifecycleLock.lock(); +System.out.println("View not locking " + lifecycleLock); +// lifecycleLock.lock(); }

        public void updateOnXMLHttpRequest(Request request) throws Exception {
        Index: src/com/icesoft/faces/webapp/http/core/JsfLifecycleExecutor.java
        ===================================================================
        — src/com/icesoft/faces/webapp/http/core/JsfLifecycleExecutor.java (revision 17428)
        +++ src/com/icesoft/faces/webapp/http/core/JsfLifecycleExecutor.java (working copy)
        @@ -14,9 +14,12 @@

        public void apply(FacesContext facesContext) {
        synchronized(facesContext)

        { +System.out.println("Executor execute/render " + facesContext + " " + Thread.currentThread()); + lifecycle.execute(facesContext); lifecycle.render(facesContext); +System.out.println(" Executor execute/render " + facesContext + " " + Thread.currentThread()); }

        }

        -}
        \ No newline at end of file
        +}
        Index: src/com/icesoft/faces/webapp/http/core/ViewBoundServer.java
        ===================================================================
        — src/com/icesoft/faces/webapp/http/core/ViewBoundServer.java (revision 17428)
        +++ src/com/icesoft/faces/webapp/http/core/ViewBoundServer.java (working copy)
        @@ -46,6 +46,7 @@
        // via the updateOnXMLHttpRequest method on the view. Further, once HTTP-1
        // releases the monitor and HTTP-2 gets it, the outbound thread can
        // clear the requestMap member variable via view.release() below
        +synchronized(view.getFacesContext()) {
        try

        { view.updateOnXMLHttpRequest(request); sessionMonitor.touchSession(); @@ -66,6 +67,7 @@ }

        finally

        { view.release(); }

        +}
        }
        }
        }
        Index: src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java
        ===================================================================
        — src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java (revision 17428)
        +++ src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java (working copy)
        @@ -253,8 +253,12 @@
        */
        public void executeAndRender() throws RenderingException {
        acquireLifecycleLock();
        +System.out.println("PFS synchronized execute/render " + facesContext + " " + Thread.currentThread());
        +synchronized(facesContext)

        { execute(); render(); +}

        +System.out.println(" PFS execute/render " + facesContext + " " + Thread.currentThread());
        }

        public void setupAndExecuteAndRender() throws RenderingException

        { @@ -366,7 +370,8 @@ }

        private void acquireLifecycleLock()

        { - lifecycleLock.lock(); +System.out.println("PFState not locking " + lifecycleLock); +// lifecycleLock.lock(); }

        private void releaseLifecycleLock()

        { @@ -437,4 +442,4 @@ fatalRenderingException(); }

        }
        -}
        \ No newline at end of file
        +}

        Show
        Ted Goddard added a comment - Adding the synchronization below eliminates the Seam exceptions, but leads to deadlock. Removing the .lock() calls also eliminates the deadlock (so with the changes below, the test application runs with no exceptions). Understanding how the locking below is functionally different from the lifecycleLock code should allow us to change where the lifecycleLock is acquired and achieve the same result but with the more flexible locking API. Note that synchronized(facesContext) still appears in some locations in the current code, so that may be a source of problems. Index: src/com/icesoft/faces/context/View.java =================================================================== — src/com/icesoft/faces/context/View.java (revision 17428) +++ src/com/icesoft/faces/context/View.java (working copy) @@ -95,7 +95,8 @@ } private void acquireLifecycleLock() { - lifecycleLock.lock(); +System.out.println("View not locking " + lifecycleLock); +// lifecycleLock.lock(); } public void updateOnXMLHttpRequest(Request request) throws Exception { Index: src/com/icesoft/faces/webapp/http/core/JsfLifecycleExecutor.java =================================================================== — src/com/icesoft/faces/webapp/http/core/JsfLifecycleExecutor.java (revision 17428) +++ src/com/icesoft/faces/webapp/http/core/JsfLifecycleExecutor.java (working copy) @@ -14,9 +14,12 @@ public void apply(FacesContext facesContext) { synchronized(facesContext) { +System.out.println("Executor execute/render " + facesContext + " " + Thread.currentThread()); + lifecycle.execute(facesContext); lifecycle.render(facesContext); +System.out.println(" Executor execute/render " + facesContext + " " + Thread.currentThread()); } } -} \ No newline at end of file +} Index: src/com/icesoft/faces/webapp/http/core/ViewBoundServer.java =================================================================== — src/com/icesoft/faces/webapp/http/core/ViewBoundServer.java (revision 17428) +++ src/com/icesoft/faces/webapp/http/core/ViewBoundServer.java (working copy) @@ -46,6 +46,7 @@ // via the updateOnXMLHttpRequest method on the view. Further, once HTTP-1 // releases the monitor and HTTP-2 gets it, the outbound thread can // clear the requestMap member variable via view.release() below +synchronized(view.getFacesContext()) { try { view.updateOnXMLHttpRequest(request); sessionMonitor.touchSession(); @@ -66,6 +67,7 @@ } finally { view.release(); } +} } } } Index: src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java =================================================================== — src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java (revision 17428) +++ src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java (working copy) @@ -253,8 +253,12 @@ */ public void executeAndRender() throws RenderingException { acquireLifecycleLock(); +System.out.println("PFS synchronized execute/render " + facesContext + " " + Thread.currentThread()); +synchronized(facesContext) { execute(); render(); +} +System.out.println(" PFS execute/render " + facesContext + " " + Thread.currentThread()); } public void setupAndExecuteAndRender() throws RenderingException { @@ -366,7 +370,8 @@ } private void acquireLifecycleLock() { - lifecycleLock.lock(); +System.out.println("PFState not locking " + lifecycleLock); +// lifecycleLock.lock(); } private void releaseLifecycleLock() { @@ -437,4 +442,4 @@ fatalRenderingException(); } } -} \ No newline at end of file +}
        Hide
        Ted Goddard added a comment -

        Currently evaluating releasing the lock in View rather than PersistentFacesState:

        ===================================================================
        — src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java (revision 17428)
        +++ src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java (working copy)

        public void setupAndExecuteAndRender() throws RenderingException {
        @@ -316,7 +318,7 @@
        */
        public void release()

        { localInstance.set(null); - releaseLifecycleLock(); +// releaseLifecycleLock(); }

        public void installContextClassLoader()

        { Index: src/com/icesoft/faces/context/View.java =================================================================== --- src/com/icesoft/faces/context/View.java (revision 17428) +++ src/com/icesoft/faces/context/View.java (working copy) @@ -209,8 +210,18 @@ facesContext.release(); persistentFacesState.release(); externalContext.release(); + releaseLifecycleLock(); }

        + private void releaseLifecycleLock() {
        + //release all locks corresponding to current thread!
        + for (int i = 0, count = lifecycleLock.getHoldCount(); i < count; i++)

        { +System.out.println(" view unlocking " + lifecycleLock); + lifecycleLock.unlock(); + }

        + }
        +
        +
        public BridgeFacesContext getFacesContext()

        { return facesContext; }
        Show
        Ted Goddard added a comment - Currently evaluating releasing the lock in View rather than PersistentFacesState: =================================================================== — src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java (revision 17428) +++ src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java (working copy) public void setupAndExecuteAndRender() throws RenderingException { @@ -316,7 +318,7 @@ */ public void release() { localInstance.set(null); - releaseLifecycleLock(); +// releaseLifecycleLock(); } public void installContextClassLoader() { Index: src/com/icesoft/faces/context/View.java =================================================================== --- src/com/icesoft/faces/context/View.java (revision 17428) +++ src/com/icesoft/faces/context/View.java (working copy) @@ -209,8 +210,18 @@ facesContext.release(); persistentFacesState.release(); externalContext.release(); + releaseLifecycleLock(); } + private void releaseLifecycleLock() { + //release all locks corresponding to current thread! + for (int i = 0, count = lifecycleLock.getHoldCount(); i < count; i++) { +System.out.println(" view unlocking " + lifecycleLock); + lifecycleLock.unlock(); + } + } + + public BridgeFacesContext getFacesContext() { return facesContext; }

          People

          • Assignee:
            Unassigned
            Reporter:
            Ken Fyten
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: