Open spring-operator opened 12 years ago
Rossen Stoyanchev commented
An issue project would be much appreciated and help speed up the resolution.
Pelz Rutsche commented
Done, I just sent the pull request.
Pelz Rutsche commented
Alright, here's the issue project for SWF-1544
Rossen Stoyanchev commented
A JSF ResourceImpl is getting serialized and stored with the custom component and it looks like its custom deserialization method (readExternal
) relies on FacesContext. However, a FacesContext is not available until the FlowFacesContextLifecycleListener is invoked, which occurs when the FlowExecution is resumed (and after being restored). Arguably a low-level operation such as serialization and de-serialization, which can occur independent of web request should not rely on the presence of a FacesContext.
Tracing back the history of Mojarra, the dependency on FacesContext during deserialization was "fixed" in JAVASERVERFACES-911 but then removed (or perhaps lost) in the very next commit r6845.
Actually, I recall now opening this ticket JAVASERVERFACES-1690. So it looks like this is the same problem actually. The fix version is 2.2 but adding your vote wouldn't hurt.
You can try the patch I added to the issue project in your own application. That'll confirm if the expected fix in Mojarra 2.2 will work.
Pelz Rutsche commented
Thanks a lot for the detailed information. I voted for JAVASERVERFACES-1690 and hopefully the fix will make it into the next release. My current workaround uses a Servlet filter which sets up a FacesContext with an empty Lifecycle as I wasn't sure if the bug was in SWF or JSF but I'll try your patch as well.
Pelz Rutsche opened SWF-1544 and commented
Steps to reproduce (or apply attached patch to issue project #653)
The NPE is thrown during unmarshaling the flow snapshot. Mojarra's Resource implementation tries to obtain a ResourceManager from the current FacesContext. The FacesContext, however, has not been set at this point since FlowFacesContextListener would get notified after a the snapshot is restored.
This issue has already been reported for version 2.2.1 but #653 has been set to "Resolved" as of inability to reproduce.
Affects: 2.3.1
Reference URL: http://forum.springsource.org/showthread.php?126554-SWF-2-3-1-JSF-Composite-Component-Not-Working
Attachments: