Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
    Bookmark Topic Watch Topic
  • New Topic

new to hibernate, help me...?

 
Mallik Avula
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi friends

i am very new to hibernate

i read one tutorial on net and i try to practice that
i created
hibernate.cfg.xml
contact.hbm.xml
Contact.java
FirstExample.java
and all these files are in same folder f:\test
i am able to compile java files
but while running i am getting NullPointerException
because

Configuration cfg = Configuration().configure(new File("f:/test/hibernate.cfg.xml"));
SessionFactory sessionFactory = cfg.buildSessionFactory();

is not working
i hope the problem will be java file unable to locate xml files

how to do this (ie classpath setting )
give some idea

any help greatly cherished

Mallik
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't post the same question in more than one topic.
 
    Bookmark Topic Watch Topic
  • New Topic