title: Could not parse configuration: /hibernate.cfg.xml
body: <p>I am new to hibernate and while working on one example i am getting below error:</p>
  
  <pre><code>log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
  log4j:WARN Please initialize the log4j system properly.
  Initial SessionFactory creation failed.org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
  Exception in thread "main" java.lang.ExceptionInInitializerError
      at com.tieto.HibernateUtil.buildSessionFactory(HibernateUtil.java:19)
      at com.tieto.HibernateUtil.&lt;clinit&gt;(HibernateUtil.java:8)
      at com.tieto.Hib.main(Hib.java:9)
  Caused by: org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
      at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1491)
      at org.hibernate.cfg.Configuration.configure(Configuration.java:1425)
      at org.hibernate.cfg.Configuration.configure(Configuration.java:1411)
      at com.tieto.HibernateUtil.buildSessionFactory(HibernateUtil.java:13)
      ... 2 more
  Caused by: org.dom4j.DocumentException: Connection refused: connect Nested exception: Connection refused: connect
      at org.dom4j.io.SAXReader.read(SAXReader.java:484)
      at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1481)
      ... 5 more
  </code></pre>
  
  <p>my hibernate.cfg.xml file is </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//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/test&lt;/property&gt;
      &lt;property name="hibernate.connection.username"&gt;root&lt;/property&gt;
      &lt;property name="hibernate.connection.password"&gt;abc&lt;/property&gt;
      &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/property&gt;
      &lt;property name="show_sql"&gt;true&lt;/property&gt;
      &lt;mapping resource="com/abc/Test.hbm.xml" /&gt;
  &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>Please suggest what i wrong in this??</p>