This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Could not parse mapping document hbm.xml

 
sarada bokka
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am having user table with userid and password .

hibernate.cfg.xml



User.hbm.xml



User.java




in my class i am trying to call

HibernateUtil.createSessionFactory();

it has thrown the error in the above statment

Could not parse mapping document from resource com/tricky/vo/User.hbm.xml


could anyone let me know what was the error in User.hbm.xml
 
Christian Dillinger
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could read the complete message: Caused by: org.hibernate.MappingException: Unable to determine entity name

You don't tell Hibernate the name of the class you are mapping. Fill the attribute "name" in your hbm.xml-File.
 
sarada bokka
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help . It's working fine now
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic