title: java.lang.IllegalArgumentException: null source
body: <p>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:</p>
  
  <ol>
  <li>Open the login page of the application.</li>
  <li>Redeployed the application on the server. </li>
  <li><p>Tried to login using the previously opened login page, and it shows the following exception:</p>
  
  <pre><code>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.&lt;init&gt;(EventObject.java:38)
      at javax.faces.event.SystemEvent.&lt;init&gt;(SystemEvent.java:67)
      at javax.faces.event.ComponentSystemEvent.&lt;init&gt;(ComponentSystemEvent.java:69)
      at javax.faces.event.PostRestoreStateEvent.&lt;init&gt;(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)
  </code></pre></li>
  </ol>
  
  <p>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. </p>
  
  <p>Anyone knows the answer?</p>