title: Where to place hibernate.cfg.xml?
body: <p>My project is like this:</p>
  
  <pre><code>/src/main/java
       -thegamers
           -app.java
           -hibernateutil.java
  </code></pre>
  
  <p>can someone tell me where to put the hibernate.cfg.xml?</p>
  
  <p>because I'm getting this error:</p>
  
  <pre><code>Initial SessionFactory creation failed.org.hibernate.HibernateException: hibernate.cfg.xml not found
  Exception in thread "main" java.lang.ExceptionInInitializerError
      at thegamers.HibernateUtil.buildSessionFactory(HibernateUtil.java:17)
      at thegamers.HibernateUtil.&lt;clinit&gt;(HibernateUtil.java:8)
      at thegamers.App.main(App.java:15)
  Caused by: org.hibernate.HibernateException: hibernate.cfg.xml not found
      at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:170)
      at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:2149)
      at org.hibernate.cfg.Configuration.configure(Configuration.java:2130)
      at thegamers.HibernateUtil.buildSessionFactory(HibernateUtil.java:13)
      ... 2 more
  </code></pre>