Return-Path: X-Original-To: apmail-myfaces-users-archive@www.apache.org Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 39628756C for ; Thu, 29 Dec 2011 16:23:31 +0000 (UTC) Received: (qmail 85365 invoked by uid 500); 29 Dec 2011 16:23:30 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 85284 invoked by uid 500); 29 Dec 2011 16:23:30 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 85276 invoked by uid 99); 29 Dec 2011 16:23:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2011 16:23:30 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gcjmu-myfaces-user@m.gmane.org designates 80.91.229.12 as permitted sender) Received: from [80.91.229.12] (HELO lo.gmane.org) (80.91.229.12) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2011 16:23:23 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RgIkv-0004XS-RI for users@myfaces.apache.org; Thu, 29 Dec 2011 17:23:01 +0100 Received: from cm209-171.liwest.at ([81.10.209.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Dec 2011 17:23:01 +0100 Received: from werner.punz by cm209-171.liwest.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Dec 2011 17:23:01 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: users@myfaces.apache.org From: Werner Punz Subject: Re: How to troubleshoot ViewExpiredException ? Date: Thu, 29 Dec 2011 17:22:55 +0100 Lines: 122 Message-ID: References: <1325155165.12704.2.camel@localhost> <4EFC773D.2040903@googlemail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm209-171.liwest.at User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: <4EFC773D.2040903@googlemail.com> The root cause of this issue is a JSF spec problem which will be addressed as it seems with jsf 2.2. The other workaround is to add all forms of the page as render targets this is the official jsf 2.1 workaround. The problem is you cannot enable a update all forms per page method per default because the javascript does not have any viewroot information and updating all forms automatically would break the portlet environments. Werner Am 29.12.11 15:20, schrieb Michael Heinen: > See https://issues.apache.org/jira/browse/MYFACES-2881 > > It seems to be still required because it updates the viewstates of all > forms on the page. > Otherwise only the viewstate of the submitted form (or rerendered forms) > is updated. > It's a workaround. > > Michael > > Am 29.12.2011 14:51, schrieb Rohit Kelapure: >> Why do I need this Javascript ? >> >> --Thanks, >> Rohit >> >> On Thu, Dec 29, 2011 at 5:39 AM, Milo van der >> Zeewrote: >> >>> He probably has multiple forms and could try to add the famous piece of >>> javascript. Even though I used RF2.1.0 and MyFaces 2.1.5 I still do need >>> it as well. >>> >>> >>> >>> MAG, >>> Milo >>> >>> >>> On Wed, 2011-12-28 at 22:55 +0100, Werner Punz 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 >>>>> >>>> >>>> >>> >>> > >