We have an application which uses JSF2 and Spring. The application works fine when deployed. But this happens if I went through the following steps:
- Open the login page of the application.
- Redeployed the application on the server.
Tried to login using the previously opened login page, and it shows the following exception:
javax.servlet.ServletException: null source at javax.faces.webapp.FacesServlet.service(FacesServlet.java:321) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) root cause java.lang.IllegalArgumentException: null source at java.util.EventObject.<init>(EventObject.java:38) at javax.faces.event.SystemEvent.<init>(SystemEvent.java:67) at javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:69) at javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:69) at com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:256) at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:245) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
If I click on the first login page and then enter the login details the application does not break. This only occurs if I try to use the previously loaded login page with the newly deployed application.
Anyone knows the answer?