myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Resolved] (MYFACES-2395) Cant' run two JSF portlets on the same portal page
Date Fri, 17 Jun 2011 19:17:48 GMT

     [ https://issues.apache.org/jira/browse/MYFACES-2395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Leonardo Uribe resolved MYFACES-2395.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.2
                   2.0.8
                   1.2.11

I checked it again and the right thing to do is get RenderKitFactory just once in each place
it is used, and deprecate this method. Anyway, I changed the code so now it use FacesContext
attribute map. In 1.2 version I add an additional instanceof to check that case and if it
is found recalculate the renderkit and prevent the bug (I don't know why I didn't do that
before! maybe too focus on explain why that setup was not working).

> Cant' run two JSF portlets on the same portal page
> --------------------------------------------------
>
>                 Key: MYFACES-2395
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2395
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Portlet_Support
>         Environment: JDK 1.5, JBoss AS 4.2.3, eXo PC 2.0.5 or eXO WCM 1.0 or eXO WCM
1.2
>            Reporter: Fernando Silva Lozano
>            Assignee: Leonardo Uribe
>             Fix For: 1.2.11, 2.0.8, 2.1.2
>
>         Attachments: hora-mundo-jsf.war, todo-jsf.war
>
>
> Running two portlets in the same portal page, using JSF and the MyFaces Portlet Bridge
(which is the RI for JSR-301, the JSF Portlet Bridge)  yelds the error bellow for the second
portlet:
> 19:31:39,704 ERROR [portletcontainer] exception returned by processAction() or render()
methods
> javax.portlet.PortletException: doBridgeDispatch failed:  error from Bridge in executing
the request
>      at javax.portlet.faces.GenericFacesPortlet.doBridgeDispatch(GenericFacesPortlet.java:504)
>      at javax.portlet.faces.GenericFacesPortlet.doRenderDispatchInternal(GenericFacesPortlet.java:456)
>      at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:231)
>      at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:354)
>      at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:202)
>      at javax.portlet.GenericPortlet.render(GenericPortlet.java:259)
>      at org.exoplatform.services.portletcontainer.plugins.pc.aop.PortletMethodCommand.render(PortletMethod
Command.java:62)
>     at org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.execute(BaseCommandUnit.java:46)
> ...
>  Caused by: javax.portlet.faces.BridgeException: java.lang.ClassCastException: org.apache.myfaces.renderkit.RenderKitFactoryImpl
>      at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.doFacesRender(BridgeImpl.java:654)
>      at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:544)
>      at javax.portlet.faces.GenericFacesPortlet.doBridgeDispatch(GenericFacesPortlet.java:501)
>      ... 63 more
> Caused by: java.lang.ClassCastException: org.apache.myfaces.renderkit.RenderKitFactoryImpl
>      at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getResponseStateManager(RendererUtils.java:
1158)
>      at org.apache.myfaces.lifecycle.DefaultRestoreViewSupport.isPostback(DefaultRestoreViewSupport.java:127)
>      at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:80)
>      at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
>      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
>      at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.doFacesRender(BridgeImpl.java:640)
>      ... 65 more
> This exception allways happen with the second portlet on the page, whichever it is. I
tried with many portlets, but so you can reproduce the problem I'm attaching the wars for
two very simple portlets.
> I'm filling this under MyFaces Core instead of Portlet Bridge because the same applications,
if deployed to use Mojarra (included in JBoss AS 4.2) and the same portelt bridge jars, work
fine.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message