myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] Commented: (ORCHESTRA-25) Orchestra does not work within BEA WebLogic JSF portlet - FacesContextFactory related problem
Date Wed, 22 Jul 2009 04:36:14 GMT


Leonardo Uribe commented on ORCHESTRA-25:

There is a patch attached on ORCHESTRA-15 that make it work in portlets. It could be good
if someone could test it on WSRP portlets on BEA Portal 9.2, so we can commit the code there
and close this issue too.

> Orchestra does not work within BEA WebLogic JSF portlet - FacesContextFactory related
> ---------------------------------------------------------------------------------------------
>                 Key: ORCHESTRA-25
>                 URL:
>             Project: MyFaces Orchestra
>          Issue Type: Bug
>          Components: FrameworkAdapter
>    Affects Versions: 1.1
>         Environment: BEA WebLogic Portal 9.2,  BEA WebLogic JSF portlets,  Sun JSF RI
1.1_01, MyFaces Orchestra 1.2 snapshot
>            Reporter: Gautam Marwaha
>         Attachments: stacktrace_1.txt, stacktrace_2.txt
> I have read about the Orchestra's support for conversation scope and think it is very
promising for an application we're building that needs to support 1) updates in wizard kind
of screens where users submit changes made in multiple tabs and 2) have this working in scenarios
where users do a ctrl+n / open new browser windows (=> session scope is ruled out)
> To get things started I am trying to get an Orchestra example (multiBean) working on
our tech stack - BEA WebLogic Portal 9.2,  BEA WebLogic JSF portlets, Sun JSF RI 1.1_01 and
MyFaces Orchestra 1.2 snapshot. We are not going to have any non-JSF functionality in our
> So far I have been successful in running the example on BEA WebLogic Portal 9.2 *without*
wrapping the JSPs within a JSF portlet. However, as soon as I wrap the JSP within a JSF portlet,
I get the following error on the examples home page (/start.jsp):
> java.lang.ClassCastException: com.sun.faces.context.MyHttpServletRequestWrapper
> 	at com.bea.portlet.adapter.faces.lifecycle.LifecycleImpl.restore(
> 	at com.bea.portlet.adapter.faces.lifecycle.LifecycleImpl.render(
> 	at com.bea.portlet.adapter.faces.FacesContentStubImpl.render(
> 	at com.bea.netuix.servlets.controls.content.FacesContent.beginRender(
> This issue is showing up because myfaces-orchestra-core-1.2-SNAPSHOT.jar!faces-config.xml
contains Orchestra related FacesContextFactory classes that are loaded by Faces Servlet upon
startup. Looks like these factories (org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory
is one of them) are not returning valid FacesContext objects (they're returning an object
meant for servlet / non-portlet environments) and cause a ClassCastException in BEA Portal's
classes that appear to be casting the request to FacesRequest, something like:
> (FacesRequest)context.getExternalContext().getRequest();
> To fix this problem, I added the BEA Portal specific FacesContextFactory (present in
their faces-adapter.jar!faces-config.xml) into my applications's faces-config.xml. i.e. the
following lines:
> <factory>
>     ....
>     <faces-context-factory>com.bea.portlet.adapter.faces.context.FacesContextFactoryImpl</faces-context-factory>
>     ....
> </factory>
> This atleast got me to the examples home page (/start.jsp) since the server appears to
have picked up the factory it last loaded. But, there is a side effect of this change. Now
I find that FrameworkAdapter has not been initialized properly. The error is:
> Caused by: java.lang.IllegalStateException: FrameworkAdapter not found
> 	at org.apache.myfaces.orchestra.conversation.ConversationManager.getInstance(
> 	at org.apache.myfaces.orchestra.conversation.ConversationManager.getInstance(
> 	at org.apache.myfaces.orchestra.conversation.spring.AbstractSpringOrchestraScope.getRealBean(
> 	at org.apache.myfaces.orchestra.conversation.spring.ScopedBeanTargetSource.getTarget(
> 	at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.getTarget(
> 	at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(
> 	at org.apache.myfaces.examples.multibean.Multibean$$EnhancerByCGLIB$$510f5a89.getBeanName()Ljava.lang.String;(:???)
> BEA Portal seems to be over-riding the Orchestra FacesContextFactory impl and not letting
it do its per-request operations.
> I have looked around for a way of getting the same thing done via Orchestra filters.
The following Orchestra filters are in my web.xml and haven't helped:
> - org.apache.myfaces.orchestra.frameworkAdapter.basic.BasicFrameworkAdapterFilter
> - org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterServletFilter
> Even tried adding the org.apache.myfaces.orchestra.conversation.jsf.filter.OrchestraServletFilter
filter but it did not help.
> I am not expecting BEA to fix/change anything on their side. Any chance this can be fixed
in Orchestra?
> Thanks,
> Gautam
> PS - will attach full stacktraces after I create this JIRA item

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message