myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott O'Bryan (JIRA)" <>
Subject [jira] Commented: (TRINIDAD-2059) NPE in CoreResponseStateManager._restoreSerializedView
Date Fri, 11 Mar 2011 17:11:00 GMT


Scott O'Bryan commented on TRINIDAD-2059:

I agree that "redirect after post" is a standard behavior for SWF, but SWF itself is not a

That said, if all that needs to happen is for us to return a null, I have no issues with it.
 Let me do some consultation of the spec for JSF and see if we're violating the contract there
somewhere.  I can't imagine a NullPointerException is an acceptable exception to throw.. 
If it is, however, then likely we'll need to open this up to the Trinidad list to get some

> NPE in CoreResponseStateManager._restoreSerializedView
> ------------------------------------------------------
>                 Key: TRINIDAD-2059
>                 URL:
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 2.0.0-beta-2
>         Environment: WinXP, IE 8, Firefox 3.6, Tomcat 5.5, Spring Web Flow 2.3.0, Mojarra
>            Reporter: Volker Malzahn
> When Trinidad runs inside Mojarra and Sping Web Flow (SWF) a Nullpointerexception occurs
when the "redirect after post" GET request is executed for a postBack:
> Caused by: java.lang.NullPointerException
> 	at<init>(
> 	at org.apache.myfaces.trinidadinternal.renderkit.core.CoreResponseStateManager._restoreSerializedView(
> 	at org.apache.myfaces.trinidadinternal.renderkit.core.CoreResponseStateManager.getTreeStructureToRestore(
> 	at org.apache.myfaces.trinidadinternal.application.StateManagerImpl.restoreView(
> 	at org.springframework.faces.webflow.FlowViewStateManager.restoreView(
> 	at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(
> 	at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(
> 	at com.sun.faces.application.view.MultiViewHandler.restoreView(
> 	at org.springframework.faces.webflow.FlowViewHandler.restoreFlowView(
> 	at org.springframework.faces.webflow.FlowViewHandler.restoreView(
> 	at javax.faces.application.ViewHandlerWrapper.restoreView(
> 	at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.restoreView(
> 	at org.springframework.faces.webflow.FlowViewHandler.restoreFlowView(
> 	at org.springframework.faces.webflow.FlowViewHandler.restoreView(
> 	at org.springframework.faces.webflow.JsfViewFactory.getView(
> 	at org.springframework.webflow.engine.ViewState.resume(
> 	at org.springframework.webflow.engine.Flow.resume(
> The reason is that in "String stateString = _getStateString(external);" null is returned
(because the GET request of SWF doesn't contain the request parameter "javax.faces.ViewState").
> CoreResponseStateManager._restoreSerializedView should become null save by putting a
"if (stateString != null) {" before the "StringReader sr = new StringReader(stateString);".
> Is it possible to restore the view if we don't have a request parameter "javax.faces.ViewState"
so that the component tree doesn't need to be built again in the GET request when emedded
into SWF?

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message