title: javax.xml.parsers.SAXParserFactory ClassCastException
body: <p>I get on my local machine the following exception when running the tests by maven (mvn test).</p>
  
  <pre><code>ch.qos.logback.core.joran.event.SaxEventRecorder@195ed659 - Parser configuration error occured 
  java.lang.ClassCastException: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl cannot be cast to javax.xml.parsers.SAXParserFactory
  </code></pre>
  
  <p>After googling around I came across several pages which describe the main problem behind it (several SAXParserFactoryImpl in different classloaders).</p>
  
  <p>-> <a href="http://www.xinotes.org/notes/note/702/" rel="noreferrer">http://www.xinotes.org/notes/note/702/</a></p>
  
  <p>My question is, how can I figure out which library is also providing the SAXParserFactoryImpl, so that I can exclude it. I am using Maven, IntelliJ and JDK 1.6.0_23. The issue occurs on the command line as well as when running the tests from IntelliJ.</p>
  
  <p>But the strange issue is, that on the build server this issue doesn't occur.</p>
  
  <p><strong>Update 1</strong></p>
  
  <p>Just figured out when I run the first time mvn test after an mvn clean, the error doesn't appear. But as soon as I run mvn test again (without clean, the exception occurs) (when I run it from IntelliJ). </p>
  
  <p>When I run it on the cmd line, then several mvn test calls do work.</p>