Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-2638

ClassCastException thrown by BridgePortletContextLiferayImpl in Liferay Portal 7 for the richfaces-applicant-portlet

    Details

      Description

      Background:

      This issue is caused by a Servlet-API dependency that was introduced in RichFaces 4.5.16 and also exists in 4.5.17. Since 4.5.17 is the sunset version of RichFaces, this issue must be worked-around in the bridge.

      Steps to Reproduce:

      1. Start Liferay Portal 7.0 CE

      2. Deploy the richfaces-applicant-portlet.war module to $LIFERAY_HOME/osgi/modules

      3. Add the "richfaces-applicant" portlet to a new portal page

      4. Reload the new portal page in the browser

      Expected result: The portlet renders normally.

      Actual result: The following error appears in the server log:

      java.lang.ClassCastException: com.liferay.faces.bridge.ext.filter.internal.BridgePortletContextLiferayImpl cannot be cast to javax.servlet.ServletContext
      	at org.richfaces.renderkit.FileUploadRendererBase.getMaxRequestSize(FileUploadRendererBase.java:126)
      	at org.richfaces.component.AbstractFileUpload.getMaxFileSize(AbstractFileUpload.java:101)
      	at javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:2407)
      	at org.richfaces.renderkit.RenderKitUtils.getAttributeAndBehaviorsValue(RenderKitUtils.java:397)
      	at org.richfaces.renderkit.RenderKitUtils.addToScriptHash(RenderKitUtils.java:622)
      	at org.richfaces.renderkit.html.FileUploadRenderer.doEncodeEnd(FileUploadRenderer.java:348)
      	at org.richfaces.renderkit.RendererBase.encodeEnd(RendererBase.java:180)
      	at javax.faces.render.RendererWrapper.encodeEnd(RendererWrapper.java:100)
      	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
      	at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
      	at javax.faces.render.RendererWrapper.encodeChildren(RendererWrapper.java:95)
      	at com.liferay.faces.bridge.ext.renderkit.html_basic.internal.SennaJSDisablingRenderer.encodeChildren(SennaJSDisablingRenderer.java:56)
      	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                bridge-impl-3.0.0
                bridge-impl-4.0.0