This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design 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
 
Have you checked out Aspose?
 
subject: problem getting configuration in hibernate 3.0
 
jQuery in Action, 3rd edition