You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "nicolas kalkhof (JIRA)" <de...@myfaces.apache.org> on 2006/08/11 08:35:13 UTC

[jira] Created: (MYFACES-1383) FacesContextFactoryImpl issue using trinidad any myfaces core

FacesContextFactoryImpl issue using trinidad any myfaces core
-------------------------------------------------------------

                 Key: MYFACES-1383
                 URL: http://issues.apache.org/jira/browse/MYFACES-1383
             Project: MyFaces Core
          Issue Type: Bug
          Components: Portlet_Support
    Affects Versions: 1.1.5-SNAPSHOT
         Environment: pluto 1.1-dev, tomcat 5.5.17 running on linux 2.6.17
            Reporter: nicolas kalkhof


trinidad won´t run in a portlet environment. problem is, that FacesContextFactoryImpl does not extend
ServletFacesContextImpl. therefore this is an internal myfaces core problem that could hopefully be fixed.
stacktrace of the crashing portlet using myfaces and trinidad:

javax.portlet.PortletException:
org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
at
org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:253)
at
org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:407)
....
Nested Exception is java.lang.ClassCastException:
org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
at
org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:387)
at
net.portlets.logon.LogonPortlet.doView(LogonPortlet.java:88)
....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Re: [jira] Commented: (MYFACES-1383) FacesContextFactoryImpl issue using trinidad any myfaces core

Posted by Arash Rajaeeyan <ar...@gmail.com>.
Hi Craig,
so you think it is better that we have another implementation of lifecyles
for JSF portlets,
(from scratch or using decoratore around current class) which can support
both ActionRequest and RenderRequest and map them to different neccessary
phases of JSF, one mapping for those who get ActionRequest and another for
those which only recieve RenderRequest.
am I correct?


On 10/29/06, Craig McClanahan (JIRA) <de...@myfaces.apache.org> wrote:
>
>     [
> http://issues.apache.org/jira/browse/MYFACES-1383?page=comments#action_12445431]
>
> Craig McClanahan commented on MYFACES-1383:
> -------------------------------------------
>
> > Looking at this issue again, it seems to me that it would be better to
> recreate the FacesContext
> > between the execute and render phases of the lifecycle. We would need to
> preserve messages
> > and some other things, but nothing to difficult to preserve. This would
> allow "wrappers" to update
> > their wrapping when the external context changes.
>
> I would recommend that this suggestion be implemented ... not just for
> consistency with the other bridges, but because the portlet lifecycle is
> different from a standard webapp lifecycle in one crucial respect.  Consider
> the scenario where you have six portlets on a particular page, all created
> with MyFaces (yeah :-).  On any given request, *one* of the six portlets
> will go through the Restore View through Invoke Application phases, while
> *all* six portlets will have the Render Response phase executed.  Thus, it
> is important for portlet developers to understand that they need to be
> prepared to rerender their current contents at any time, whether or not they
> were the portlet that received this particular postback.  The easiest way to
> do that is to treat a single portlet request as two JSF requests ... one for
> the execute part of the lifecycle, and one for the render part.
>
> And that, by the way, is why the Lifecycle API has these two subsets of
> the overall lifecycle split into two methods.
>
>
>
> > FacesContextFactoryImpl issue using trinidad any myfaces core
> > -------------------------------------------------------------
> >
> >                 Key: MYFACES-1383
> >                 URL: http://issues.apache.org/jira/browse/MYFACES-1383
> >             Project: MyFaces Core
> >          Issue Type: Bug
> >          Components: Portlet_Support
> >    Affects Versions: 1.1.5-SNAPSHOT
> >         Environment: pluto 1.1-dev, tomcat 5.5.17 running on linux
> 2.6.17
> >            Reporter: nicolas kalkhof
> >
> > trinidad won´t run in a portlet environment. problem is, that
> FacesContextFactoryImpl does not extend
> > ServletFacesContextImpl. therefore this is an internal myfaces core
> problem that could hopefully be fixed.
> > stacktrace of the crashing portlet using myfaces and trinidad:
> > javax.portlet.PortletException:
> >
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> > at
> >
> org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle
> (MyFacesGenericPortlet.java:253)
> > at
> > org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(
> MyFacesGenericPortlet.java:407)
> > ....
> > Nested Exception is java.lang.ClassCastException:
> >
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> > at
> > org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(
> MyFacesGenericPortlet.java:387)
> > at
> > net.portlets.logon.LogonPortlet.doView(LogonPortlet.java:88)
> > ....
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>


-- 
Arash Rajaeeyan

[jira] Commented: (MYFACES-1383) FacesContextFactoryImpl issue using trinidad any myfaces core

Posted by "Scott O'Bryan (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1383?page=comments#action_12439903 ] 
            
Scott O'Bryan commented on MYFACES-1383:
----------------------------------------

Sorry it's taken so long for me to fix this issue.  I'm hammered with Trinidad issues at the moment.  I looked at this issue and am posting some possible solutions to the myfaces-dev list.  Here is the technical ins and outs of the issue.

The Faces' Lifecycle object is split into two faces: execute and render.  During the execute phase, the faces application executes all phases of the lifecycle up to but not including the "Render Response" phase.  When running from a portlet, this happens in the processAction method of the BridgePortlet which creates an ExternalContext with the Portal's  ActionRequest/Response object.  Once the processAction method is complete, the Portal then executes the portlet's "render" method.  During this phase, the Portal must change the ExternalContext to contain the Portal's RenderRequest/Response.

The issue here is that the Trinidad FacesContextFactory wraps the MyFaces FacesContextFactory class.  Inside of this Factory, Trinidad retrieves the MyFaces' FacesContext object and wraps it in it's own object.  This is essentially issue one.  The MyFaces Bridge portlet assumes that the current FacesContext object is the one provided by MyFaces which exposes functionality to change the ExternalContext.  This is not the case because what is returned is the Trinidad FacesContext which does not have this functionality.

Normally, we could simply "wrap" the Trinidad FacesContect object in our own and change the ExternalContext.  The problem is that Trinidad's FacesContext wraps the ExternalContext as well, allowing functionality for a special resource resolver on the dispatch method.  Simply changing the external context to an "unwrapped" version is not sufficient.

There are a number of approaches we can take to this issue and I'm going to ping the Dev list for MyFaces to see if people have a preference.  None of the changes should be particularly complex, but with the way Faces is designed, it is bad that our Faces Bridge portlet assumes these objects are not wrapped.

> FacesContextFactoryImpl issue using trinidad any myfaces core
> -------------------------------------------------------------
>
>                 Key: MYFACES-1383
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1383
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Portlet_Support
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: pluto 1.1-dev, tomcat 5.5.17 running on linux 2.6.17
>            Reporter: nicolas kalkhof
>
> trinidad won´t run in a portlet environment. problem is, that FacesContextFactoryImpl does not extend
> ServletFacesContextImpl. therefore this is an internal myfaces core problem that could hopefully be fixed.
> stacktrace of the crashing portlet using myfaces and trinidad:
> javax.portlet.PortletException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:253)
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:407)
> ....
> Nested Exception is java.lang.ClassCastException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:387)
> at
> net.portlets.logon.LogonPortlet.doView(LogonPortlet.java:88)
> ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Updated: (MYFACES-1383) FacesContextFactoryImpl issue using trinidad any myfaces core

Posted by "Scott O'Bryan (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1383?page=all ]

Scott O'Bryan updated MYFACES-1383:
-----------------------------------

    Status: Patch Available  (was: Open)

> FacesContextFactoryImpl issue using trinidad any myfaces core
> -------------------------------------------------------------
>
>                 Key: MYFACES-1383
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1383
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Portlet_Support
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: pluto 1.1-dev, tomcat 5.5.17 running on linux 2.6.17
>            Reporter: nicolas kalkhof
>
> trinidad won´t run in a portlet environment. problem is, that FacesContextFactoryImpl does not extend
> ServletFacesContextImpl. therefore this is an internal myfaces core problem that could hopefully be fixed.
> stacktrace of the crashing portlet using myfaces and trinidad:
> javax.portlet.PortletException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:253)
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:407)
> ....
> Nested Exception is java.lang.ClassCastException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:387)
> at
> net.portlets.logon.LogonPortlet.doView(LogonPortlet.java:88)
> ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Updated: (MYFACES-1383) FacesContextFactoryImpl issue using trinidad any myfaces core

Posted by "Scott O'Bryan (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1383?page=all ]

Scott O'Bryan updated MYFACES-1383:
-----------------------------------

    Status: Patch Available  (was: Open)

> FacesContextFactoryImpl issue using trinidad any myfaces core
> -------------------------------------------------------------
>
>                 Key: MYFACES-1383
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1383
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Portlet_Support
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: pluto 1.1-dev, tomcat 5.5.17 running on linux 2.6.17
>            Reporter: nicolas kalkhof
>
> trinidad won´t run in a portlet environment. problem is, that FacesContextFactoryImpl does not extend
> ServletFacesContextImpl. therefore this is an internal myfaces core problem that could hopefully be fixed.
> stacktrace of the crashing portlet using myfaces and trinidad:
> javax.portlet.PortletException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:253)
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:407)
> ....
> Nested Exception is java.lang.ClassCastException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:387)
> at
> net.portlets.logon.LogonPortlet.doView(LogonPortlet.java:88)
> ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-1383) FacesContextFactoryImpl issue using trinidad any myfaces core

Posted by "Scott O'Bryan (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1383?page=comments#action_12445288 ] 
            
Scott O'Bryan commented on MYFACES-1383:
----------------------------------------

Looking at this issue again, it seems to me that it would be better to recreate the FacesContext between the execute and render phases of the lifecycle.  We would need to preserve messages and some other things, but nothing to difficult to preserve.  This would allow "wrappers" to update their wrapping when the external context changes.

The one downfall is that this is a pretty major change from the current functionality of the Faces Bridge Portlet although it is more inline with other Bridge Portlets.  Anyone have an issue with this?

> FacesContextFactoryImpl issue using trinidad any myfaces core
> -------------------------------------------------------------
>
>                 Key: MYFACES-1383
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1383
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Portlet_Support
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: pluto 1.1-dev, tomcat 5.5.17 running on linux 2.6.17
>            Reporter: nicolas kalkhof
>
> trinidad won´t run in a portlet environment. problem is, that FacesContextFactoryImpl does not extend
> ServletFacesContextImpl. therefore this is an internal myfaces core problem that could hopefully be fixed.
> stacktrace of the crashing portlet using myfaces and trinidad:
> javax.portlet.PortletException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:253)
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:407)
> ....
> Nested Exception is java.lang.ClassCastException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:387)
> at
> net.portlets.logon.LogonPortlet.doView(LogonPortlet.java:88)
> ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-1383) FacesContextFactoryImpl issue using trinidad any myfaces core

Posted by "Scott O'Bryan (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1383?page=comments#action_12428850 ] 
            
Scott O'Bryan commented on MYFACES-1383:
----------------------------------------

I think I have a solution which I'll try to apply tomorrow.  The portlet is using the setExternalContext method on the ServletFacesContextImpl in order to create the new external context.  The simple "fix" is to apply a decorator pattern to this instead.

> FacesContextFactoryImpl issue using trinidad any myfaces core
> -------------------------------------------------------------
>
>                 Key: MYFACES-1383
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1383
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Portlet_Support
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: pluto 1.1-dev, tomcat 5.5.17 running on linux 2.6.17
>            Reporter: nicolas kalkhof
>
> trinidad won´t run in a portlet environment. problem is, that FacesContextFactoryImpl does not extend
> ServletFacesContextImpl. therefore this is an internal myfaces core problem that could hopefully be fixed.
> stacktrace of the crashing portlet using myfaces and trinidad:
> javax.portlet.PortletException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:253)
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:407)
> ....
> Nested Exception is java.lang.ClassCastException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:387)
> at
> net.portlets.logon.LogonPortlet.doView(LogonPortlet.java:88)
> ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-1383) FacesContextFactoryImpl issue using trinidad any myfaces core

Posted by "Scott O'Bryan (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1383?page=comments#action_12446784 ] 
            
Scott O'Bryan commented on MYFACES-1383:
----------------------------------------

Well that WAS handled by the previous implementation.  Still, what didn't work was when the Context was decorated.  This bridge is in some sorry shape, but I did at least break the FacesContext into a two part creation.  Right now it stores some data that allows the lifecycle to be re-created with the same properties (like facesMessages and whatnot) while still allowing wrapping.  My suggestion is to rewrite this to JSR-301 when it comes out, however.  I'm on the EG and will work on it as we get closer.  Either way, I think that Trinidad can move forward.

> FacesContextFactoryImpl issue using trinidad any myfaces core
> -------------------------------------------------------------
>
>                 Key: MYFACES-1383
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1383
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Portlet_Support
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: pluto 1.1-dev, tomcat 5.5.17 running on linux 2.6.17
>            Reporter: nicolas kalkhof
>
> trinidad won´t run in a portlet environment. problem is, that FacesContextFactoryImpl does not extend
> ServletFacesContextImpl. therefore this is an internal myfaces core problem that could hopefully be fixed.
> stacktrace of the crashing portlet using myfaces and trinidad:
> javax.portlet.PortletException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:253)
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:407)
> ....
> Nested Exception is java.lang.ClassCastException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:387)
> at
> net.portlets.logon.LogonPortlet.doView(LogonPortlet.java:88)
> ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Updated: (MYFACES-1383) FacesContextFactoryImpl issue using trinidad any myfaces core

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1383?page=all ]

Martin Marinschek updated MYFACES-1383:
---------------------------------------

    Status: Open  (was: Patch Available)

> FacesContextFactoryImpl issue using trinidad any myfaces core
> -------------------------------------------------------------
>
>                 Key: MYFACES-1383
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1383
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Portlet_Support
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: pluto 1.1-dev, tomcat 5.5.17 running on linux 2.6.17
>            Reporter: nicolas kalkhof
>
> trinidad won´t run in a portlet environment. problem is, that FacesContextFactoryImpl does not extend
> ServletFacesContextImpl. therefore this is an internal myfaces core problem that could hopefully be fixed.
> stacktrace of the crashing portlet using myfaces and trinidad:
> javax.portlet.PortletException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:253)
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:407)
> ....
> Nested Exception is java.lang.ClassCastException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:387)
> at
> net.portlets.logon.LogonPortlet.doView(LogonPortlet.java:88)
> ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-1383) FacesContextFactoryImpl issue using trinidad any myfaces core

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1383?page=comments#action_12446794 ] 
            
Matthias Weßendorf commented on MYFACES-1383:
---------------------------------------------

I take a look over weekend / monday!

> FacesContextFactoryImpl issue using trinidad any myfaces core
> -------------------------------------------------------------
>
>                 Key: MYFACES-1383
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1383
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Portlet_Support
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: pluto 1.1-dev, tomcat 5.5.17 running on linux 2.6.17
>            Reporter: nicolas kalkhof
>         Assigned To: Matthias Weßendorf
>         Attachments: bridge.patch
>
>
> trinidad won´t run in a portlet environment. problem is, that FacesContextFactoryImpl does not extend
> ServletFacesContextImpl. therefore this is an internal myfaces core problem that could hopefully be fixed.
> stacktrace of the crashing portlet using myfaces and trinidad:
> javax.portlet.PortletException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:253)
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:407)
> ....
> Nested Exception is java.lang.ClassCastException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:387)
> at
> net.portlets.logon.LogonPortlet.doView(LogonPortlet.java:88)
> ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-1383) FacesContextFactoryImpl issue using trinidad any myfaces core

Posted by "Scott O'Bryan (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1383?page=comments#action_12428845 ] 
            
Scott O'Bryan commented on MYFACES-1383:
----------------------------------------

Hmmm.  I don't know why it WOULD have to do this.  I'll take a look at the Portlet Bridge, but it seems to me that requiring a Portlet FacesContext to derrive itself off ServletFacesContextImpl is a little silly.  The change may be required in Trinidad.  I'll take a look at both and post the patch where appropriate.

> FacesContextFactoryImpl issue using trinidad any myfaces core
> -------------------------------------------------------------
>
>                 Key: MYFACES-1383
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1383
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Portlet_Support
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: pluto 1.1-dev, tomcat 5.5.17 running on linux 2.6.17
>            Reporter: nicolas kalkhof
>
> trinidad won´t run in a portlet environment. problem is, that FacesContextFactoryImpl does not extend
> ServletFacesContextImpl. therefore this is an internal myfaces core problem that could hopefully be fixed.
> stacktrace of the crashing portlet using myfaces and trinidad:
> javax.portlet.PortletException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:253)
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:407)
> ....
> Nested Exception is java.lang.ClassCastException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:387)
> at
> net.portlets.logon.LogonPortlet.doView(LogonPortlet.java:88)
> ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-1383) FacesContextFactoryImpl issue using trinidad any myfaces core

Posted by "Craig McClanahan (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1383?page=comments#action_12445431 ] 
            
Craig McClanahan commented on MYFACES-1383:
-------------------------------------------

> Looking at this issue again, it seems to me that it would be better to recreate the FacesContext
> between the execute and render phases of the lifecycle. We would need to preserve messages
> and some other things, but nothing to difficult to preserve. This would allow "wrappers" to update
> their wrapping when the external context changes.

I would recommend that this suggestion be implemented ... not just for consistency with the other bridges, but because the portlet lifecycle is different from a standard webapp lifecycle in one crucial respect.  Consider the scenario where you have six portlets on a particular page, all created with MyFaces (yeah :-).  On any given request, *one* of the six portlets will go through the Restore View through Invoke Application phases, while *all* six portlets will have the Render Response phase executed.  Thus, it is important for portlet developers to understand that they need to be prepared to rerender their current contents at any time, whether or not they were the portlet that received this particular postback.  The easiest way to do that is to treat a single portlet request as two JSF requests ... one for the execute part of the lifecycle, and one for the render part.

And that, by the way, is why the Lifecycle API has these two subsets of the overall lifecycle split into two methods.



> FacesContextFactoryImpl issue using trinidad any myfaces core
> -------------------------------------------------------------
>
>                 Key: MYFACES-1383
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1383
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Portlet_Support
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: pluto 1.1-dev, tomcat 5.5.17 running on linux 2.6.17
>            Reporter: nicolas kalkhof
>
> trinidad won´t run in a portlet environment. problem is, that FacesContextFactoryImpl does not extend
> ServletFacesContextImpl. therefore this is an internal myfaces core problem that could hopefully be fixed.
> stacktrace of the crashing portlet using myfaces and trinidad:
> javax.portlet.PortletException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:253)
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:407)
> ....
> Nested Exception is java.lang.ClassCastException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:387)
> at
> net.portlets.logon.LogonPortlet.doView(LogonPortlet.java:88)
> ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MYFACES-1383) FacesContextFactoryImpl issue using trinidad any myfaces core

Posted by "Scott O'Bryan (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1383?page=comments#action_12428849 ] 
            
Scott O'Bryan commented on MYFACES-1383:
----------------------------------------

Ok, this is not en entirely correct.  The issue is that the "current" FacesContext which is stored on the session is assumed to be a ServletFacesContextImpl, but it is not.  I am looking to see WHY the ServletFacesContextImpl is needed and see if I can't code around it.

> FacesContextFactoryImpl issue using trinidad any myfaces core
> -------------------------------------------------------------
>
>                 Key: MYFACES-1383
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1383
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Portlet_Support
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: pluto 1.1-dev, tomcat 5.5.17 running on linux 2.6.17
>            Reporter: nicolas kalkhof
>
> trinidad won´t run in a portlet environment. problem is, that FacesContextFactoryImpl does not extend
> ServletFacesContextImpl. therefore this is an internal myfaces core problem that could hopefully be fixed.
> stacktrace of the crashing portlet using myfaces and trinidad:
> javax.portlet.PortletException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:253)
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:407)
> ....
> Nested Exception is java.lang.ClassCastException:
> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
> at
> org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:387)
> at
> net.portlets.logon.LogonPortlet.doView(LogonPortlet.java:88)
> ....

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira