hmmm... i followed your advice and changed
Code:
Configuration cfg = new Configuration().configure(new File("hibernate.cfg.xml"));
to
Code:
Configuration cfg = new Configuration().configure();
and now hibernate can not find hibernate.cfg.xml at all. (This was the reason I had that line in the first place)
From the documentation, it seems to say that the hibernate.cfg.xml should be in the root of the classpath. My classpath is set to "c:\test;." I am comiling and running my program from within the directory "c:\test". My java code and hibernate.cfg.xml is inside this directory and the code compiles fine.
Perhaps i am confused about the meaning of "the root of the classpath" Is my classpath set wrongly? All the third party libraries required by hibernate I have put in %JAVAHOME%\jre\lib\ext because it became too tedious to enter each library into my classpath... could this be related to the problem?
Anyway here is my new error output. Thanks in advance for any assistance..
28/08/2003 09:11:13 net.sf.hibernate.cfg.Environment <clinit>
INFO: Hibernate 2.0.2
28/08/2003 09:11:13 net.sf.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
28/08/2003 09:11:13 net.sf.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
28/08/2003 09:11:13 net.sf.hibernate.cfg.Environment <clinit>
INFO: JVM proxy support: true
28/08/2003 09:11:13 net.sf.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
28/08/2003 09:11:13 net.sf.hibernate.cfg.Configuration getConfigurationInputStream
WARNING: /hibernate.cfg.xml not found