Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem getting configuration in hibernate 3.0

 
subbarao dachepalli
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic