1 2 Previous Next 21 Replies Latest reply on Feb 4, 2013 11:23 AM by ibrewster Go to original post
      • 15. Re: javax.faces.application.ViewExpiredException:

        Nice solution Alexey, works fine for me except on one point. I had to create the logoutTemp.xhtml file. If I don't, I get a 404 error. If I do, all work.

        Are you sure about the fact we don't need to make it ? (perhaps I make a mistake somewhere). I understand that it will never be printed because of the redirect tag but even so it seems it is needed.

        • 16. Re: javax.faces.application.ViewExpiredException:

          Seems to me, that the simplests solution is (following by the booking example):

          <page view-id="*">    
               <navigation from-action="#{identity.logout}">
                    <redirect view-id="/home.xhtml"/>

          This entry is from pages.xml of course.

          • 17. Re: javax.faces.application.ViewExpiredException:
            I have ViewExpiredException prolbem but the context is a little different.
            My application works fine when the load is not heavy. Since we are running load testing, we ramp up the number of users and number of transactions and that is when we see this:

            [11/16/10 16:49:34:195 CST] 00000050 lifecycle     E   JSF1054: (Phase ID: RESTORE_VIEW 1, View ID: "") Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@5ef55ef5]
            [11/16/10 16:49:34:211 CST] 00000050 servlet       E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet Faces Servlet in application GPW. Exception created : javax.servlet.ServletException: viewId:/RegisterOnline-Step4.gd - View /RegisterOnline-Step4.gd could not be restored.
                    at java.lang.Throwable.<init>(Throwable.java:80)
                    at javax.servlet.ServletException.<init>(ServletException.java:97)
                    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:246)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                    at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
                    at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
                    at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
                    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
                    at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
                    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
                    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
                    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
                    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
                    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:445)
                    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:504)
                    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:301)
                    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
                    at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1772)
                    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
                    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
                    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
                    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
                    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
                    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
                    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
                    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1563)
            Caused by: javax.faces.application.ViewExpiredException: viewId:/RegisterOnline-Step4.gd - View /RegisterOnline-Step4.gd could not be restored.
                    at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:186)
                    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
                    at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104)
                    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
                    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
                    ... 45 more

            I don't think Session timeout or conversation timeout happened. After the page is loaded, user data is input by loadrunner( I have a think time of 5-15 seconds), somehow when the submit button is clicked, either the view id is lost from the session or the session is cleared. I tried to save the view on client side but it didn't help.
            Any idea how this can happen?
            Thanks in advance.
            • 18. Re: javax.faces.application.ViewExpiredException:


              We too are experiencing similar problem as you are facing, when the server is under heavy load.

              Can you let me know if you found a fix to the problem please.



              • 19. Re: javax.faces.application.ViewExpiredException:
                The simpler way to fix this issue is to in the logout link use a view page which is secured, meaning a login is required for the user to access it.

                For example below home.xhtml is secured using the entries in  pages.xml

                "<s:link view="/home.xhtml" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}" propagation="none"/>"

                pages.xml has the below.

                <page view-id="/home.xhtml" login-required="true">
                        <restrict>#{s:hasRole('Admin') or s:hasRole('Member')}</restrict>
                • 20. Re: javax.faces.application.ViewExpiredException:

                  Hello everyone.

                  I'd like to share investigation of this problem. My problem was that after corret login and seeing HomePage any next click on any link/tab/button caused this javax.faces.application.ViewExpiredException. My enviroment is WAS 7/IBM jsf impl 1.2/Seam 2.2.0. GA. Workarounds aka "enableRestoreView11Compatibility" or CLIENT_SAVE_STATE are not the point for me, they only decorates the issue.


                  After debugging richfaces classes I noticed that on each request works with new instance of Session. Thus, AjaxStateHolder is created every time instead of gettin already created from the HttpSession. Then I viewed http calls within firebug and saw that JSESSION cookie were not stored on browser (WAS was configured to use cookies only in https channel). And each request without JSESSION my application server considered as a beggining of a new HttpSession.

                  So, correct session managment configuration on application server resolved this issue.

                  Whould be glad if this helps someone.

                  • 21. Re: javax.faces.application.ViewExpiredException:

                    Environment: JBoss 5.1, RichFaces 3.3.3 Final, Facelets 1.1.15.B1, Seam 2.2.0



                    I am getting a ViewExpiredException with the following steps:



                    1. Login

                    2. Use app normally, then log-out (seam Identity.logout) which navigates back to login page

                    3. Login again, navigate to page and select any postback action - showing modal panels, navigating to new sub-dialogues etc



                    The thing is this - it only happens in a particular dialogue and only when using Firefox (Chrome & IE are OK). I can happily use other dialogues quite happily but once I get into this particular dialogue it goes belly up. I've trawled the forums looking for solutions and have tried a number of recommended things such as a custom ViewHandler to cope with the session expiring whilst the browser is sat on the login page but idle (this works fine - trying to extend it to pages other than login gives an) and a filter to prevent caching but nothing seems to stop this happening. I've set the facelets context parameter BUILD_BEFORE_RESTORE which again didn't help


                    Anyone had a similar experience?


                    The dialogue in question is quite complex instructure and is built from several includes, decorates etc so is nigh on impossible to list unfortunately but then I'm not sure it would help anyway.


                    Any help would be very much appreciated




                    1 2 Previous Next