@Martin, I will try the suggestion above to reproduce the issue by throwing a exception in garageSaleJSFActions.updateCart or introducing an artificial rollback exception. If I can recreate consistently I will be able to fix it fast.
@Mark, I am also investigating my session persistence settings to understand why the viewstate is disappearing when an exception occurs. --Thanks for the input guys. Once I have tried the suggestions I will circle back and provide feedback, Rohit Kelapure On Fri, Dec 30, 2011 at 6:49 AM, Martin Koci <[email protected]>wrote: > Hi, > > I had similar problem once and it was caused by combination of unhandled > exception + ajax-error. > > When exception occurs in partial/ajax request/respose (for example SQL > exception), JSF send back to client XML with following structure: > <partial-response> > <error> > <error-name>...</error-name> > <error-message>...</error-message> > </error> > </partial-response> > > this XML does not contain ViewState update element. I can't recollect > now fully, but somehow was possible, that saved state was removed from > server cache on successful restore view (something with params > NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION and NUMBER_OF_VIEWS_IN_SESSION) > and viewState on client not updated because of ajax error handling. > > Is VVE reproducible when you throw an exception in > garageSaleJSFActions.updateCart ? > > > Regards, > > Kočičák > > Rohit Kelapure píše v Čt 29. 12. 2011 v 16:31 -0500: > > Werner and Michael, > > > > I will employ the workaround suggested to see if it helps. > > I do have a mix of f:ajax and h:form on my facelet. > showShoppingCart.xhtml > > > > <h:commandButton type="submit" value="Update" > > styleClass="commandExButton" id="updateButton" > > action="#{garageSaleJSFActions.updateCart}"> > > > > <f:ajax execute="@form" > > render="cartForm:cartTable cartForm:subTotal cartForm:taxAmount > > cartForm:total" /> > > </h:commandButton> > > > > Once this ViewExpiredException occurs does it affect other pages that do > > NOT have multiple forms ? > > > > --Thanks, > > Rohit > > > > On Wed, Dec 28, 2011 at 4:55 PM, Werner Punz <[email protected]> > wrote: > > > > > Do you use multiple forms in conjunction with JSF ajax? > > > > > > Werner > > > > > > > > > Am 28.12.11 18:30, schrieb Rohit Kelapure: > > > > > >> Dear all, > > >> > > >> We have run into an issue with our application in production wherein > once > > >> a > > >> database rollback occurs, our application state somehow gets messed > and we > > >> repeatedly keep seeing ViewExpiredExceptions like so ... > > >> > > >> [12/24/11 3:51:52:301 EST] 000003b3 SystemErr R > > >> javax.faces.application.**ViewExpiredException: /showItem.xhtml No > saved > > >> view > > >> state could be found for the view identifier: /showItem.xhtmlnull > > >> [12/24/11 3:51:52:302 EST] 000003b3 SystemErr R at > > >> org.apache.myfaces.lifecycle.**RestoreViewExecutor.execute(** > > >> RestoreViewExecutor.java:128)**null > > >> [12/24/11 3:51:52:302 EST] 000003b3 SystemErr R at > > >> org.apache.myfaces.lifecycle.**LifecycleImpl.executePhase(** > > >> LifecycleImpl.java:171)null > > >> [12/24/11 3:51:52:302 EST] 000003b3 SystemErr R at > > >> org.apache.myfaces.lifecycle.**LifecycleImpl.execute(** > > >> LifecycleImpl.java:118)null > > >> > > >> Caused by: javax.faces.application.**ViewExpiredException: > > >> /showShoppingCart.xhtml No saved view state could be found for the > view > > >> identifier: /showShoppingCart.xhtml > > >> at > > >> org.apache.myfaces.lifecycle.**RestoreViewExecutor.execute(** > > >> RestoreViewExecutor.java:128) > > >> at > > >> org.apache.myfaces.lifecycle.**LifecycleImpl.executePhase(** > > >> LifecycleImpl.java:171) > > >> at > > >> org.apache.myfaces.lifecycle.**LifecycleImpl.execute(** > > >> LifecycleImpl.java:118) > > >> at com.ibm.faces20.portlet.**FacesPortlet.processAction(** > > >> FacesPortlet.java:238) > > >> > > >> This happens for ALL the JSF facelets *.xhtml files in our > application. > > >> This is a JSF 2 application. > > >> > > >> What is the next step in debugging these ViewExpiredExceptions ? > > >> For starters I have enabled the trace * > > >> *=info:org.apache.myfaces.**lifecycle*=all* > > >> * > > >> > > >> * > > >> All your tips are appreciated. > > >> > > >> --Thanks, > > >> Rohit Kelapure > > >> > > >> > > > > > > > > >

