/hibernate.cfg.xml not found

      14 Comments on /hibernate.cfg.xml not found

Problem: Many a times we get a problem in hibernate saying /hibernate.cfg.xml not found

Solution: As per Java Persistence with Hibernate book , you should keep the hibernate configuration file directly in the source directory of your project outside any package. In Rational Application Developer, I have solved this problem by placing it directly under src folder.

14 thoughts on “/hibernate.cfg.xml not found

  1. g

    Another solution is to change the SessionFactory creation in HibernateUtil.java

    pathToHibernateCfg = “hibernate/resources/hibernate.cfg.xml”;
    return new Configuration().configure(pathToHibernateCfg).buildSessionFactory();

    Reply
  2. Davis

    Where exactly did you actually pick up the tips to compose ““/hibernate.
    cfg.xml not found « Techspace”? I appreciate it ,Cassandra

    Reply
  3. Accutane

    Hello, I do believe your blog could possibly be having internet
    browser compatibility problems. Whenever I look at your blog in Safari, it looks fine
    but when opening in Internet Explorer, it has some overlapping issues.
    I merely wanted to give you a quick heads
    up! Aside from that, great site!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *