title: NullPointerException when using faces-config and PrimeFaces 4.0
body: <p>When using PrimeFaces and faces-config together, I get a NullPointerException. Before adding faces-config.xml, everything worked fine. After I added faces-config.xml for changing navigation, I got the following Error when calling every page:</p>
  
  <pre><code>java.lang.NullPointerException
    org.primefaces.context.PrimeFacesContext.release(PrimeFacesContext.java:26)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:612)
    org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:98)
    de.mypackage.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:19)
  </code></pre>
  
  <p>The CharacterEncodingFilter just ensures usage of UTF-8:</p>
  
  <pre><code>public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException {
      request.setCharacterEncoding("UTF-8");
      chain.doFilter(request, response);
  }
  </code></pre>
  
  <p>So this can't be an error source. The faces-config.xml contains the following text:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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_1_2.xsd"
  version="1.2"&gt;
  &lt;navigation-rule&gt;
      &lt;from-view-id&gt;*&lt;/from-view-id&gt;
      &lt;navigation-case&gt;
          &lt;from-outcome&gt;index&lt;/from-outcome&gt;
          &lt;to-view-id&gt;/index.jsf&lt;/to-view-id&gt;
      &lt;/navigation-case&gt;
  &lt;/navigation-rule&gt;
  </code></pre>
  
  <p></p>
  
  <p>This should direct every link to index to one index.jsf, not regarding in which folder the current site is. But if the faces-config.xml is just like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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_1_2.xsd"
  version="1.2"&gt;
  </code></pre>
  
  <p></p>
  
  <p>the same error appears.</p>
  
  <p>Everything is running on Tomcat 7.</p>
  
  <p>The search for the error did not contain much results, in <a href="http://forum.primefaces.org/viewtopic.php?f=3&amp;t=30109&amp;start=10" rel="nofollow">http://forum.primefaces.org/viewtopic.php?f=3&amp;t=30109&amp;start=10</a> someone seems to have the same problem with an old release of PrimeFaces 4.0, but as I'm getting it from maven, this can't be my error.</p>
  
  <p>Has anybody an hint how to solve this problem?</p>