com.sun.faces.lifecycle.Phase doPhase SEVERE: JSF1054: (Phase ID: RESTORE_VIEW 1, View ID: ) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@55d7b]
SEVERE: Servlet.service() for servlet Faces Servlet threw exception javax.faces.application.ViewExpiredException: viewId:/xxxx.jsf - View /xxxx.jsf could not be restored. at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:186) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
Turns out that this usually happens if you have a request that refers to JSF ViewIds (the structure of the jsf page) that doesn't exist in the session on the server. For example, a users session could be timed out on the server, so when the user makes a request to the server with the ViewId, it no longer exist and you will most likely receive the above exception.
The reason why this suddenly shows up is that JSF 1.1 and 1.2 handles the session timeout differently. Now you actually have a chance to react upon the thrown exception whereas previously it was just ignored and the view tree was just regenerated from scratch.
Anyways... What you can do to avoid this is two things:
- Handle the exception, for example by adding a filter that shows a nice page to the user
- Insert the following in your web.xml: