Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-4800

s:link does not work on failover in a clustered environment

    Details

      Description

      When clicking on an s:link after a node has been taken down, the exception below is thrown. The s:link will only work if the page is refreshed first so it is served by the new JBoss instance, but that negates transparent failover.

      Method of reproducing:

      • Two EAP 5.1 nodes fronted with mod_jk. No firewall, sticky sessions + session replication definitely enabled.
      • JBDS Seam generated ear + a simple @Clustered EJB3 which has a method that takes a parameter and prints the EL parametrized text (I don't think EL parametrization is relevant here)
      • Click on the s:link on the page, it invokes fine, go back in the browser. Shutdown the active JBoss instance. Click the s:link again which is redirected to the 2nd JBoss now and receive:

      14:17:42,995 ERROR [Exceptions] handled and logged exception
      java.lang.IllegalStateException: Unable to read view /home.xhtml to execute action "#

      {someComponent.printText('Hello World')}

      "
      at org.jboss.seam.navigation.SafeActions.isActionSafe(SafeActions.java:67)
      at org.jboss.seam.navigation.Pages.callAction(Pages.java:699)
      at org.jboss.seam.navigation.Pages.preRender(Pages.java:331)
      at org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:561)
      at org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:472)
      at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:148)
      at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:118)

      SafeActions.java:67 isn't so telling:
      ===================
      String viewId = id.substring(0, loc);
      String action = "\"#

      {" + id.substring(loc+1) + "}

      \"";

      InputStream is = FacesContext.getCurrentInstance().getExternalContext().getResourceAsStream(viewId);
      if (is==null) throw new IllegalStateException("Unable to read view " + "/" + viewId + " to execute action " + action);
      ===================

      The code says the InputStream is null on failover, so the getResourceAsStream(viewId) failed to return anything.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  manaRH Marek Novotny
                  Reporter:
                  sjmenden Samuel Mendenhall
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: