title: Apache POI (poi-ooxml) for Excel 2007 and Spring MVC DocumentBuilderFactory cannot be found
body: <p>I'm having some trouble trying to include Apache POI poi-ooxml library to my project. I'm using Maven and the following dependency:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
          &lt;artifactId&gt;poi-ooxml&lt;/artifactId&gt;
          &lt;version&gt;3.8&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>But after doing this I'm not able to start my Spring MVC app again, Here is the stacktrace:</p>
  
  <blockquote>
    <p>Exception created : org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/context/applicationContext.xml]; nested exception is javax.xml.parsers.FactoryConfigurationError: Provider for javax.xml.parsers.DocumentBuilderFactory cannot be found</p>
  </blockquote>
  
  <p>So, what I understand is that poi-ooxml is including another xml parser that override the default Java VM defaut one that is used by Spring to read its xml configuration file.</p>
  
  <p>If I exclude the 2 following libs:</p>
  
  <ul>
  <li>xmlbeans</li>
  <li>xml-apis</li>
  </ul>
  
  <p>All is working fine (I'm able to start my Spring app) but of course Apache POI is no longer working as he's missing these 2 required libs...</p>
  
  <p>Any advice will be greatly appreciated ;)</p>
  
  <p>Thanks</p>