title: Hibernate org.apache.xerces.parsers.SAXParser does not implement XMLReader exception
body: <p>When I try config hibernate and java app (how Jira service) , I have this error:
  
  
  <pre><code>Warning: Caught exception attempting to use SAX to load a SAX XMLReader 
  [INFO] [talledLocalContainer] Warning: Exception was: java.lang.ClassCastException:org.apache.xerces.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader
  [INFO] [talledLocalContainer] Warning: I will print the stack trace then carry on using the default SAX parser
  [INFO] [talledLocalContainer] java.lang.ClassCastException: org.apache.xerces.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader
  [INFO] [talledLocalContainer]   at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:243)
  [INFO] [talledLocalContainer]   at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:194)
  [INFO] [talledLocalContainer]   at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:83)
  [INFO] [talledLocalContainer]   at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:894)
  [INFO] [talledLocalContainer]   at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:715)
  [INFO] [talledLocalContainer]   at org.dom4j.io.SAXReader.read(SAXReader.java:435)
  [INFO] [talledLocalContainer]   at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1518)
  </code></pre>
  
  <p>--></p>
  
  <pre><code>Caused by: org.hibernate.HibernateException: Could not parse configuration: hibernate.cfg.xml
  [INFO] [talledLocalContainer]   at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1528)
  [INFO] [talledLocalContainer]   at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:1035)
  Caused by: org.dom4j.DocumentException: SAX2 driver class org.apache.xerces.parsers.SAXParser does not implement XMLReader Nested exception: SAX2 driver class org.apache.xerces.parsers.SAXParser does not implement XMLReader
  [INFO] [talledLocalContainer]   at org.dom4j.io.SAXReader.read(SAXReader.java:484)
  [INFO] [talledLocalContainer]   at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1518)
  [INFO] [talledLocalContainer]   ... 14 more
  </code></pre>
  
  <p>--></p>
  
  <p>....
  My hibernate.cfg.xml :
  
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;!DOCTYPE hibernate-configuration PUBLIC
      "-//Hibernate/Hibernate Configuration DTD//EN"
      "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&gt;
  &lt;hibernate-configuration&gt;
      &lt;session-factory&gt;
          &lt;property name="hibernate.connection.driver_class"&gt;com.mysql.jdbc.Driver&lt;/property&gt;
          &lt;property name="hibernate.connection.url"&gt;jdbc:mysql://localhost:3306/navision&lt;/property&gt;
          &lt;property name="hibernate.connection.username"&gt;admin&lt;/property&gt;
          &lt;property name="hibernate.connection.password"&gt;admin&lt;/property&gt;
          &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.MySQL5Dialect&lt;/property&gt;
          &lt;property name="hibernate.show_sql"&gt;false&lt;/property&gt;
          &lt;property name="hibernate.cache.use_query_cache"&gt;false&lt;/property&gt;
          &lt;property name="hibernate.cache.use_second_level_cache"&gt;false&lt;/property&gt;
          &lt;property name="hibernate.generate_statistics"&gt;false&lt;/property&gt;
          &lt;property name="hibernate.c3p0.acquire_increment"&gt;1&lt;/property&gt;
          &lt;property name="hibernate.c3p0.idle_test_period"&gt;100&lt;/property&gt;
          &lt;property name="hibernate.c3p0.max_size"&gt;100&lt;/property&gt;
          &lt;property name="hibernate.c3p0.max_statements"&gt;0&lt;/property&gt;
          &lt;property name="hibernate.c3p0.min_size"&gt;10&lt;/property&gt;
          &lt;property name="hibernate.c3p0.timeout"&gt;100&lt;/property&gt;
          &lt;property name="connection.provider_class"&gt;org.hibernate.connection.C3P0ConnectionProvider&lt;/property&gt;
          &lt;property name="hbm2ddl.auto"&gt;update&lt;/property&gt;
      &lt;/session-factory&gt;
  </code></pre>
  
  <p></p>
  
  <p>--></p>
  
  <p>I have this error when i try to init SessionFactory for db:
  
  
  <pre><code>ourSessionFactory = new AnnotationConfiguration().configure("hibernate.cfg.xml").addAnnotatedClass(Navision.class).buildSessionFactory(); 
  </code></pre>
  
  <p>--></p>