Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error View could not be restored.

 
ray frid
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi all, i have deployed successfully my project on tomcat, and I get this error when I try to enter the page
anyone could have any idea what cause this error:

06/01/2011 18:52:04 com.sun.faces.lifecycle.LifecycleImpl phase
WARNING: executePhase(RESTORE_VIEW 1,com.sun.faces.context.FacesContextImpl@1baeec3) threw exception
javax.faces.application.ViewExpiredException: viewId:/packages_login.jsf - View /packages_login.jsf could not be restored.
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:185)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)


thanks,

ray.
 
Srinivasan thoyyeti
Ranch Hand
Posts: 557
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ray Frid,

JSF normally saves the UI component tree state either at Client side or at Server side.

Default Server, in this case UI state stored in session context, so if you were happened to delay your submit request (post back) in such a way session timeout happens then
the UI state stored in it also gone with it.

So you would like to handle this exception and display a proper Session time out page.
 
ray frid
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way of preventing this? it happens all the time!

Ofcourse I can handle the exception, and show a proper msg to the user, but isn't it a way of preventing it from first place? or handle it in a way that the page will render itself and work properly?

thanks,

ray,
 
Srinivasan thoyyeti
Ranch Hand
Posts: 557
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Try increasing your session timeout in web.xml


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic