This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes basic app Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "basic app Hibernate" Watch "basic app Hibernate" New topic

basic app Hibernate

vendikonda sravan
Ranch Hand

Joined: May 09, 2010
Posts: 38
Hi ,
I have written fallowing code to and getting fallowing error

resource: connect.hbm.xml not found
where as i have allredy written the resource: connect.hbm.xml file in current package.
can some buddy explain the problem.
main code

config file

HibernateSessionFactory class

hbm file
Varun Phadnis

Joined: Oct 20, 2010
Posts: 4
It obviously cannot find the "connect.hbm.xml" file. Check your directory structure to determine the correct path of the file. as a last resort try putting the file in the same directory as your Hibernatedemo source file.
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

<!-- mapping resource="\Hibernatedemo\Hibernatedemo\src\firstpackage\connect.hbm.xml"-->

This line looks very suspect. For one thing it's commented out, for another that is an odd looking path. Is \Hibernatedemo really the root of your classpath?

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: basic app Hibernate
jQuery in Action, 3rd edition