This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate example error message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate example error message" Watch "Hibernate example error message" New topic
Author

Hibernate example error message

Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
Hi,

I am trying following hibernate example from link

http://www.vaannila.com/hibernate/hibernate-example/hibernate-mapping-many-to-one-using-annotations-1.html.

It is giving error as given below





My code looks like

Main.java file looks like this



Address.java looks like


student.java looks like


hibernmate.cfg file looks like


How can i resolve this issue. Any ideas, suggestions, resources, links highly appreciated. Thanks in advance
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

You forgot to declare the mappings in hibernate.cfg.xml


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
Thank you very much.
 
jQuery in Action, 2nd edition
 
subject: Hibernate example error message
 
Similar Threads
One to Many Mapping : org.hibernate.MappingException: Association references unmapped class
org.hibernate.MappingException: table refers to an unmapped class
Foreign key must have same number of columns
SQLGrammarException
Reason for stack overflow exception while trying to read hibernate managed objects