I cannot make hibernate read my config file stored at a specific location. I am using Hibernate 2.1
Code:
SessionFactory sf = new Configuration()
.configure("C:\\hibernate.cfg.xml")
.buildSessionFactory();
Here is the error log
I have ofcourse tried with both slash and backslash?
Code:
10:03:22,921 INFO Environment:478 - Hibernate 2.1.7
10:03:22,941 INFO Environment:507 - hibernate.properties not found
10:03:22,951 INFO Environment:538 - using CGLIB reflection optimizer
10:03:22,951 INFO Environment:567 - using JDK 1.4 java.sql.Timestamp handling
10:03:22,961 INFO Configuration:900 - configuring from resource: C:\hibernate.cfg.xml
10:03:22,961 INFO Configuration:872 - Configuration resource: C:\hibernate.cfg.xml
10:03:22,971 WARN Configuration:876 - C:\hibernate.cfg.xml not found
10:03:22,981 ERROR HibernateUtil:32 - Initial SessionFactory creation failed.
net.sf.hibernate.HibernateException: C:\hibernate.cfg.xml not found