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

MappingNotFoundException

 
Bai Shen
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm creating a Hibernate Servlet, but I keep getting a MappingNotFoundException. I'm not sure why as I'm doing things like in the tutorial.

Here's my beans.User.java file.


Here's my hibernate.cfg.xml file.


And here's my User.hbm.xml file.


And my file structure is thus.



I'm pretty sure I just have silly typo or something, but I can't seem to see it. TIA.
[ November 14, 2008: Message edited by: Bai Shen ]
 
srija patel
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Include <mapping resource="beans/User.hbm.xml"/> in your hbm.cfg.xml
 
Bai Shen
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That did it. Thanks. I knew it was something small like that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic