This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JSF and the fly likes Not Session Timeout, but throw javax.faces.application.ViewExpiredException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Not Session Timeout, but throw javax.faces.application.ViewExpiredException" Watch "Not Session Timeout, but throw javax.faces.application.ViewExpiredException" New topic
Author

Not Session Timeout, but throw javax.faces.application.ViewExpiredException

pradeep gamage
Ranch Hand

Joined: Aug 03, 2009
Posts: 85

5:27:20,955 ERROR [STDERR] javax.faces.application.ViewExpiredException: viewId:/trading_portal.xhtml - View /trading_portal.xhtml could not be restored.

15:27:20,956 ERROR [STDERR] at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:195)

15:27:20,956 ERROR [STDERR] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)

15:27:20,956 ERROR [STDERR] at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107)

15:27:20,956 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)

15:27:20,956 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)

15:27:20,956 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)

15:27:20,956 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)

15:27:20,956 ERROR [STDERR] at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)

15:27:20,957 ERROR [STDERR] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)

15:27:20,957 ERROR [STDERR] at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)

15:27:20,957 ERROR [STDERR] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)

15:27:20,957 ERROR [STDERR] at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:109)

15:27:20,957 ERROR [STDERR] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)

15:27:20,957 ERROR [STDERR] at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)

15:27:20,957 ERROR [STDERR] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)

15:27:20,957 ERROR [STDERR] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)

15:27:20,957 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)

15:27:20,957 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)

15:27:20,957 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

15:27:20,957 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

15:27:20,957 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)

15:27:20,957 ERROR [STDERR] at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)

15:27:20,957 ERROR [STDERR] at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)

15:27:20,957 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)

15:27:20,957 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)

15:27:20,957 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

15:27:20,957 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

15:27:20,957 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

15:27:20,957 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

15:27:20,957 ERROR [STDERR] at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)

15:27:20,957 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)

15:27:20,957 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

15:27:20,957 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)

15:27:20,957 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)


I am getting this error in my project. I don't know reason for this error? help me.....!
Thanks in advance


Software Engineer(BSC):SCJP 1.5
(Knowledge is power when applied)
Ilari Moilanen
Ranch Hand

Joined: Apr 15, 2008
Posts: 198
This is a very common exception and is thrown when you try to use a view that has already expired (expiration depends on many factors).
We need more information of your situation. When exactly are you getting this exception etc
pradeep gamage
Ranch Hand

Joined: Aug 03, 2009
Posts: 85

I am using richfaces, JSF 2. I want execute some methods repeatedly(5 seconds) to update trading portal(web page) . but when i logging to trading portal that error coming. Not Session Timeout.
Thanks in advance
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15629
    
  15

View timeout and session timeout are not related. The View is the digested JSF page definition. Depending on web.xml, it can either be stored on the server or passed back and forth to the client. For a number of reasons, the preferred approach is to cache views on the server, but to conserve resources, views are periodically purged from the server's view cache. When that happens and a request is made to redisplay the view, you get a ViewExpiredException.

Adjusting session parameters will do no good, since, as I said, the cached views aren't coming from the session.

There are some web.xml settings you can make to control JSF view timeout. I recommend you read up on them.


Customer surveys are for companies who didn't pay proper attention to begin with.
David Post
Greenhorn

Joined: Nov 23, 2011
Posts: 2
[i believe ive found the solution to this based on the code i found at http://www.gregbugaj.com/?p=164 he suggested



i couldnt get this to work so i tried


and this seems to prevent the ViewExpiredExceptions.dont foget to modify faces-config.xml

<?xml version="1.0" encoding="UTF-8"?>

<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0">
<application>
<view-handler>
auction.applictaion.CustomViewHandler
</view-handler>
</application>
</faces-config>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not Session Timeout, but throw javax.faces.application.ViewExpiredException
 
Similar Threads
JSF,Spring MVC, Hibernate Integration exception
Need Urgent Help on Faces El Evaluation and Null Pointer Exception
Hibernate + mysql jdbc on production
getting java.lang.NullPointerException
Facelets exception thrown when upgrading to JSF 2 and RichFaces 4