hi
whenever i run hibernate through netbeans, i am getting the following error.
i get the same error when i run through the command prompt.
i need to know whether i have to set classpath differently for hibernate.cfg.xml. i am putting this file in the source directory under the development directory.
even the corresponding jar created through compiling with netbeans records this file location, but does not detect it when run.
run:
15:48:45,905 INFO Environment:469 - Hibernate 2.1.6
15:48:45,921 INFO Environment:498 - hibernate.properties not found
15:48:45,921 INFO Environment:529 - using CGLIB reflection optimizer
15:48:45,936 INFO Configuration:895 - configuring from resource: /hibernate.cfg.xml
15:48:45,936 INFO Configuration:867 - Configuration resource: /hibernate.cfg.xml
15:48:45,936 WARN Configuration:871 - /hibernate.cfg.xml not found
Exception in
thread "main" net.sf.hibernate.HibernateException: /hibernate.cfg.xml not found
at net.sf.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:872)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:896)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:883)
at test.hiber.InsertProduct.main(InsertProduct.java:27)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
The cause of error occurs at the line where we initialise transaction.
the other mechanism of using hibernate.properties file does not work as it is also not getting detected.
can anyone help me out with this trouble. i have been struck for over 4 days with this.
karthik.