File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes hibernate Cant Find hibernate.cfg.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "hibernate Cant Find hibernate.cfg.xml" Watch "hibernate Cant Find hibernate.cfg.xml" New topic

hibernate Cant Find hibernate.cfg.xml

reza aghazade

Joined: Oct 01, 2013
Posts: 4
hi folks,,
i use code Below ( HibernateUtil Class) for creating the SessionFactory,,

But App send me an error,,

& you can see my Project Structure in here:


there was 2 Error:

1-hibernate Cant find Hibernate.cfg.xml
2-server class 'com.mySampleApplication.client.StudentDTO' could not be found in the web app,
Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 356
It is a web application. Make sure that the hibernate.cfg.gwt.xml and .class files are in classes folder inside the WEB-INF folder. Try to create structure as follows:

SCJP 1.4, SCWCD1.4, OCA(1Z0-007)
jQuery in Action, 2nd edition
subject: hibernate Cant Find hibernate.cfg.xml