javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2508

CompositeComponentAttributeELResolver$ExpressionEvalMap caches FacesContext and fails in Portlet bridge renderRequest because cached FacesContext is released

    Details

      Description

      With Portlet 2 bridge two distinct instances of FacesContext are used for the two Portlet phases (request processing, response rendering). Now since FacesContext is cached in CompositeComponentAttributeELResolver$ExpressionEvalMap and as it seems the ELResolver's are reused by the Portlet Bridge for the two phases, during render response an already released FacesContext instance is causing:

      	java.lang.IllegalStateException
      	at com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:655)
      	at com.sun.faces.context.FacesContextImpl.getELContext(FacesContextImpl.java:250)
      	at javax.faces.context.FacesContextWrapper.getELContext(FacesContextWrapper.java:341)
      	at com.sun.faces.el.CompositeComponentAttributesELResolver$ExpressionEvalMap.get(CompositeComponentAttributesELResolver.java:349)
      	at javax.el.MapELResolver.getValue(MapELResolver.java:164)
      	.... 
      

      To make this save, the cached FacesContext should be queried for it's release state and in case it's released re-cache the current FacesContext.getCurrentInstance() to make this Portlet save.

      1. changebundle.txt
        8 kB
        Manfred Riem
      2. changebundle.txt
        1 kB
        Hanspeter Duennenberger
      3. Exception in CompositeComponentAttributeELResolver in Portlet render phase.txt
        13 kB
        Hanspeter Duennenberger

        Activity

          People

          • Assignee:
            Manfred Riem
            Reporter:
            Hanspeter Duennenberger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: