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

Showcase error: LiferayResourceURLImpl cannot be cast to javax.portlet.PortletURL

    Details

      Description

      Steps to reproduce:

      1. Deploy the Showcase
      2. Click on the general use case for portlet:resourceURL
      http://localhost:8080/web/guest/showcase/-/component/portlet/resourceurl/general

      Expected results:

      • the example should render the Liferay Faces Logo

      Actual Results:

      • Get the following error in the tomcat log:
        17:04:35,327 DEBUG [DebugPhaseListener:48] AFTER phaseId=[RENDER_RESPONSE 6] viewId=[/views/component.xhtml]
        Apr 27, 2015 5:04:35 PM org.apache.catalina.core.ApplicationDispatcher invoke
        SEVERE: Servlet.service() for servlet 1 Servlet threw exception
        javax.portlet.faces.BridgeException: javax.faces.FacesException: com.liferay.faces.bridge.filter.liferay.internal.LiferayResourceURLImpl cannot be cast to javax.portlet.PortletURL
           at com.liferay.faces.bridge.internal.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:104)
           at com.liferay.faces.bridge.internal.BridgeImpl.doFacesRequest(BridgeImpl.java:136)
           at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:255)
           at com.liferay.faces.demos.portlet.ActionURLDemoPortlet.doView(ActionURLDemoPortlet.java:64)
           at com.liferay.faces.demos.portlet.ShowcasePortlet.doView(ShowcasePortlet.java:41)
        ... (snipped for brevity) ...
        Caused by: java.lang.ClassCastException: com.liferay.faces.bridge.filter.liferay.internal.LiferayResourceURLImpl cannot be cast to javax.portlet.PortletURL
           at com.liferay.faces.bridge.renderkit.portlet.internal.ResourceURLRenderer.encodeEnd(ResourceURLRenderer.java:45)
           at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
           at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312)
        

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                liferay-faces-2.1.5-ga6
                liferay-faces-2.2.5-ga6
                liferay-faces-3.0.5-legacy-ga6
                liferay-faces-3.0.5-ga6
                liferay-faces-3.1.5-ga6
                liferay-faces-3.2.5-ga6
                liferay-faces-4.2.5-ga6