• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help need in Configuration of Hibernate

 
Siddharth Bhargava
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am using Configuration class to add all the configuration properties. Then I am using the Configuration class's object to build the SessionFactory. Following is the code.


Shouldn't this code work ???
It saying hibernate.cfg.xml not found. I have not given the hibernate.cfg.xml as I have given all the configuration properties in the Configuration class. Is hibernate.cfg.xml still needed ???

Please Help !!!
 
Edvins Reisons
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is the configure() method that is looking for the configuration file.
 
Siddharth Bhargava
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
got the clue ... thanks a lot .......
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic