ICEfaces
  1. ICEfaces
  2. ICE-5254

WindowScope uses Servlet specific API and throws ClassCastException running as a portlet

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha1
    • Fix Version/s: 2.0-Alpha2, 2.0.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Portal portlet

      Description

      During Neil's development of the portlet bridge, he updated from the Alpha 1 release to run against the current trunk and ran into:

       01:10:33,044 ERROR [jsp:165] java.lang.ClassCastException: com.liferay.portlet.PortletSessionImpl
        at org.icefaces.application.WindowScopeManager.lookup(WindowScopeManager.java:132)

      Which is caused by:

          public synchronized static WindowScopeManager lookup(FacesContext context) {
              ExternalContext externalContext = context.getExternalContext();
              HttpSession session = (HttpSession) externalContext.getSession(true);
              ExternalContextConfiguration configuration = new ExternalContextConfiguration("org.icefaces", externalContext);
              return lookup(session, configuration);
          }

      We have an EnvUtils class that we can use for methods and such where we have environment specific requirements.

        Activity

        Hide
        Mircea Toma added a comment -

        Make WindowScopeManager.lookup(FacesContext) method compatible with Portlet or Servlet based enviroment.

        Show
        Mircea Toma added a comment - Make WindowScopeManager.lookup(FacesContext) method compatible with Portlet or Servlet based enviroment.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: