| View previous topic :: View next topic |
| Author |
Message |
sudhakartv
Joined: 05 May 2005 Posts: 1
|
Posted: Thu May 05, 2005 4:30 pm Post subject: This is a Hibernate questions. |
|
|
Hi, I am trying to run the firstexample as explained in the tutorial (http://www.roseindia.net/hibernate/firstexample.shtml).
I am using hibernate2 with WSAD5.1.1 .I got the following error.
I put my hibernate.cfg.xml file under WEB-INF/hibernate.cfg.xml.
I have follwing in my class path.
cglib-full-2.0.1.jar
coomons-collections.jar
commmons-logging.jar
dom4j-1.4.jar
hibernate2.jar
odmg-3.0.jar
struts.jar
May 5, 2005 11:21:44 AM net.sf.hibernate.cfg.Environment <clinit>
INFO: Hibernate 2.1.4
May 5, 2005 11:21:44 AM net.sf.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
May 5, 2005 11:21:44 AM net.sf.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
/hibernate.cfg.xml not found
May 5, 2005 11:21:44 AM net.sf.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
May 5, 2005 11:21:44 AM net.sf.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
May 5, 2005 11:21:44 AM net.sf.hibernate.cfg.Configuration getConfigurationInputStream
WARNING: /hibernate.cfg.xml not found
Exception in thread "main" java.lang.NullPointerException
at com.FirstExample.main(FirstExample.java:44)
Thanks for oyur help.
Sudhakar |
|
| Back to top |
|
 |
Deepak Kumar Guest
|
Posted: Sat May 07, 2005 10:47 am Post subject: Connect place to put config file |
|
|
Hi,
It is required to put the config file in the classes directory of the web application. so move the hibernate.cfg.xml into WEB-INF/classes/hibernate.cfg.xml directory.
Regards
Deepak kumar |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Jun 28, 2006 3:53 am Post subject: |
|
|
excellent !! |
|
| Back to top |
|
 |
balaji Guest
|
Posted: Wed Sep 20, 2006 2:45 pm Post subject: getting null pointer exception when executing FirstExample |
|
|
| good tutorial |
|
| Back to top |
|
 |
kchinta Guest
|
Posted: Wed Dec 27, 2006 5:27 am Post subject: WARNING: /hibernate.cfg.xml not found |
|
|
| i put the hibernate.cfg.xml file inWEB-INF/classes/hibernate.cfg.xml ,but this is not working, same error is came, can you please help me |
|
| Back to top |
|
 |
|