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

        Deryk Sinotte created issue -
        Deryk Sinotte made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 2.0-Alpha2 [ 10214 ]
        Assignee Priority P1
        Assignee Mircea Toma [ mircea.toma ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20205 Wed Jan 13 07:49:39 MST 2010 mircea.toma ICE-5254 Make WindowScopeManager.lookup(FacesContext) method compatible with Portlet or Servlet based enviroment.
        Files Changed
        Commit graph MODIFY /icefaces/scratchpads/glimmer/core/src/main/java/org/icefaces/application/WindowScopeManager.java
        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.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 2.0.0 [ 10230 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1

          People

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

            Dates

            • Created:
              Updated:
              Resolved: