Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-6283

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP_EWP 5.1.0
    • Fix Version/s: EAP_EWP 5.1.1 ER2
    • Component/s: Seam2
    • Labels:
      None
    • Environment:

      EAP 5.1.0
      Seam 2.2.2.EAP5

    • Affects:
      Release Notes
    • Release Notes Text:
      Hide
      <code>s:link</code> was not working if pages containing the <code>s:link</code> were not previously rendered on the JBoss Enterprise Platform instance. This caused an <errorcode>IllegalStateException: Unable to read &lt;page&gt;</errorcode>, because the method binding for the Seam UI page actions were not added to the SafeActions on other servers. <code>viewId</code> now includes the path to the web context root in each searching path, which allows pages to remain active when workload is moved between nodes.
      Show
      <code>s:link</code> was not working if pages containing the <code>s:link</code> were not previously rendered on the JBoss Enterprise Platform instance. This caused an <errorcode>IllegalStateException: Unable to read &lt;page&gt;</errorcode>, because the method binding for the Seam UI page actions were not added to the SafeActions on other servers. <code>viewId</code> now includes the path to the web context root in each searching path, which allows pages to remain active when workload is moved between nodes.
    • Release Notes Docs Status:
      Documented as Resolved Issue
    • Docs QE Status:
      ON_QA

      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:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: