3 Replies Latest reply on Oct 5, 2009 4:03 AM by animasgsw

    aj4 calls failing in jboss portal 2.7.2

    lakshmi.rath

      Hi,

      While migrating to HTTPS (SSL mode), we are facing issues in making a4j requests from JSF portlet in jboss portal. The exception received is enclosed below.

      The details of our implementation are:
      Richfaces 3.2.0.GA
      portletbridge 1.0.0.B3
      jsf-facelets 1.1.12
      portal version: 2.7.2

      Please let me know incase anybody has faced a similar kind of issue or has any pointers and the steps taken to obtain a4j calls successfully.

      The exception received is below;

      exception

      javax.servlet.ServletException: viewId:/jsp/scheduleReport.faces - View /jsp/scheduleReport.faces could not be restored.
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:270)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
      org.ajax4jsf.Filter.doFilter(Filter.java:175)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      root cause

      javax.faces.application.ViewExpiredException: viewId:/jsp/scheduleReport.faces - View /jsp/scheduleReport.faces could not be restored.
      com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:186)
      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
      com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104)
      com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
      org.ajax4jsf.Filter.doFilter(Filter.java:175)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      Thanks,
      Lakshmi

        • 1. Re: aj4 calls failing in jboss portal 2.7.2
          wesleyhales

          Upgrade to the latest CR2 bridge and try again.

          • 2. Re: aj4 calls failing in jboss portal 2.7.2
            lakshmi.rath

            Hi Wesley,

            Thanks for the prompt response.
            I will surely try out CR2 and check.

            Meanwhile, we also gave a try with PortletBridge2.0Alpha and found a4j calls happening properly in SSL. Hence wanted to check if it is ok to use Alpha version in production.

            Also, is Beta/Stable release expected soon.

            Thank you for all your support.

            regards,,
            Lakshmi

            • 3. Re: aj4 calls failing in jboss portal 2.7.2

              Hi ,
              We tried with following versions and see Ajax calls are happening -
              richfaces(3.3.0 GA)
              jsf-facelets-1.1.15.B1.jar
              JBossPortletBridge-1.0.0.CR1

              Configuration done for this is as below -
              <context-param><param-name>com.sun.faces.enableRestoreView11Compatibility</param-name>
              <param-value>true</param-value></context-param>

              However we see following changes in behaviour -
              1.JSF beans which are stored in session can't be fetched from JSF SessionMap (probably as this uses HTTPSession and not PortalSession)
              Hence the standard call
              appSecBeanInst = (ApplicationSecurityDataBean) context
              .getExternalContext().getSessionMap().get(ApplicationConstants.APPLICATIONSECDATABEAN)
              is not working as expected(SessionMap is coming as empty object)
              2.Unlike FaceletViewHandler , the PortletViewHandler(used as View handler) prefixes Portalname,Pagename and Window name with every JSF element id . Hence any JavaScript calls which are made using document.getElementByid.. are failing.

              Please guide us how to address this issues, as those are being used in our application earlier.