1 Reply Latest reply on Oct 13, 2009 5:14 PM by mike jones

    No Active Conversation Context Error - Seam 2.2.0

    mike jones Newbie
      I have been desperately trying to get a fix for an issue but to no avail.

      I just setup Seam 2.2.0 for a project.

      I have 3 pages with back and next buttons.

      The buttons look like this

      <s:button id="back" alt="back"
                                                                                                      value="#{messages['button.back']}" action="#{atSearchSFSB.back}" </s:button>

      All the butttons are Seam buttons.  When I click back and forth between the pages

      it works for a while then all of the sudden I get this error

      10/7/09 9:41:13:616 EDT] 0000002b viewhandler E Error Rendering View[/view/test_change.xhtml]
                                       java.lang.IllegalStateException: No active conversation context
              at org.jboss.seam.core.Conversation.instance(Conversation.java:122)
              at org.jboss.seam.ui.component.UIConversationId.getName(UIConversationId.java:44)
              at org.jboss.seam.ui.util.ViewUrlBuilder.addParameter(ViewUrlBuilder.java:42)
              at org.jboss.seam.ui.component.UISeamCommandBase.getUrl(UISeamCommandBase.java:85)
              at org.jboss.seam.ui.renderkit.ButtonRendererBase.getOnClick(ButtonRendererBase.java:37)
              at org.jboss.seam.ui.renderkit.ButtonRendererBase.doEncodeBegin(ButtonRendererBase.java:66)
              at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)
              at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:802)
              at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:232)
              at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:118)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826)
              at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
              at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
              at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)

      I do not get this error when I use a regular JSF Command Button only when I use a

      Seam button.  Its not consistent.  It just happens after click around the application

      for a while.  I just click back and forward then it breaks.

      I am using WebSphere 7.0.5.  I followed all the configuration steps in the Seam

      reference.  I really need some assistance.

      Thanks
        • 1. Re: No Active Conversation Context Error - Seam 2.2.0
          mike jones Newbie

          I was able to resolve the No Conversation Context error.
          I was not aware but the jboss-seam.jar includes a faces-config.xml which adds the SeamPhaseListener.
          I have a separate faces-config.xml for my application and also
          add the SeamPhaseListener so it was getting added twice.
          Somehow this was causing the No Conversation Context error.
          I removed the phase listener from the faces-config.xml from
          my application and everything is working.
          I think this should be added to the Seam documentation somewhere
          the fact that the SeamPhaseListener has already been added
          to the jboss-seam.jar and developers don't need to add it
          to the faces-config.xml that is used by their application because
          it appears to cause strange behavior.