Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4335652
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:41:57+00:00 2026-05-21T10:41:57+00:00

We recently upgraded a major platform from jsf 1.2 to 2.0. After upgrading we’re

  • 0

We recently upgraded a major platform from jsf 1.2 to 2.0. After upgrading we’re getting several ViewExpiredException errors each hour. From reading up on the topic it seems that this is an expected exception when sessions expire, however we’ve reviewed the access logs and we are getting these exceptions even when requests are only 5 minutes apart in some cases.

My questions are as follows:

1) Other than session expiration, what other conditions might cause ViewExpiredException?

2) The exception we’re logging doesn’t contain much detail about the exact condition that is causing the exception (missing session, corrupt session, unable to restore a particular component). Is there a way to introduce additional logging to find out the very specific situation that is triggering this exception in each case?

Mojarra 2.0.4-b09
Tomcat 6
Using Memcached Session Manager for session replication

Any help is appreciated. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T10:41:58+00:00Added an answer on May 21, 2026 at 10:41 am

    Other than session expiration, what other conditions might cause ViewExpiredException?

    The enduser has requested/created too much views within a session and is submitting to an old view. The default max views per session is 15. In other words, if the enduser opens 16 browser windows/tabs on a page with a form within the same session and submits to the first one, then the user can get ViewExpiredException.

    The max views per session is configureable in web.xml by

    <context-param>
        <param-name>com.sun.faces.numberOfViewsInSession</param-name>
        <param-value>15</param-value>
    </context-param>
    

    See also Mojarra FAQ for other parameters.


    Is there a way to introduce additional logging to find out the very specific situation that is triggering this exception in each case?

    Not through JSF and/or a ViewExpiredException. The whole exception just means that the view is not present in the session anymore. This can in turn indeed have more underlying causes. Logging the session creation and destroy using a HttpSessionListener and logging the session attribute modifications by HttpSessionAttributeListener may be helpful.


    Update as per the comments, pressing the browser back button on a cached page containing a form and then submitting the form thereafter could indeed also cause ViewExpiredException when the view is been expired. This can be solved in following two ways, preferably in a combination of them:

    • Instruct the browser to not cache the pages.
    • Do not use POST forms for plain page-to-page navigation.

    For more detail, see this answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently upgraded my SVN client from 1.6.9 to 1.7.2 and after converting to
I recently upgraded my Silverlight app from 3 to 4. After a few hours
I recently upgraded Xcode from 3.2 to 4.2. After the upgrade I was having
I recently upgraded to ggplot2 0.9.0 from version 0.8.9, and now I'm getting that
we recently upgraded to Hibernate Search 4.1 and are getting errors when we run
I recently upgraded my magento from 1.4 to 1.6.1 after fixing lots of bugs
I recently upgraded from jQuery 1.2.6 to 1.3.2 Now on the page I'm using
I recently upgraded my machine from Leopard to Snow Leopard. Also I installed the
I recently upgraded my app from Spring 2.5.6 to Spring 3.0.0. A few days
I recently upgraded from Vista/32 to Win7/64. On my old machine, everything was working

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.