File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Help need in Configuration of Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Help need in Configuration of Hibernate " Watch "Help need in Configuration of Hibernate " New topic
Author

Help need in Configuration of Hibernate

Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 227
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

Joined: Dec 11, 2006
Posts: 364
It is the configure() method that is looking for the configuration file.
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 227
got the clue ... thanks a lot .......
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Help need in Configuration of Hibernate
 
Similar Threads
Hibernate Configuration
Exception in ClassFormatError: Absent Code attribute
JNDI error message
Hibernate Dialect must be explicitly set
Can we Write more than 2 hibernate.cfg.xml's?