aspose file tools*
The moose likes Object Relational Mapping and the fly likes problem getting configuration in hibernate 3.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "problem getting configuration in hibernate 3.0" Watch "problem getting configuration in hibernate 3.0" New topic
Author

problem getting configuration in hibernate 3.0

subbarao dachepalli
Greenhorn

Joined: Jul 28, 2005
Posts: 5
Hi all

I am new hibernate.I tried to do some simple program.
But i got null pointer exception.

my code is :
Configuration cfg = new Configuration().addClass(Contact.class);
System.out.println("-----c-"+cfg);
cfg.configure("/hibernate.cfg.xml");
SessionFactory sessionFactory = cfg.buildSessionFactory();
session =sessionFactory.openSession();

I am not able to get that println.(I added that println to know where exactly the null pointer exception is throwing).

can any body tell me where iam going wrong
Thanks in advamce
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem getting configuration in hibernate 3.0
 
Similar Threads
null pointer exception using session factory
Help need in Configuration of Hibernate
No TransactionManagerLookup specified Exception
basic app Hibernate
Hibernate help