Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate: MappingNotFoundException  RSS feed

 
Arnob Dey
Ranch Hand
Posts: 34
Eclipse IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm new to Hibernate attempting to learn the very basics. I been following along the video tutorials at Javabrains.

I can't figure out what went wrong with the following code:

jdk: 1.8_45
IDE: Eclipse
Hibernate: 4.3.6
Database: PostgreSQL


hibernate.cfg.xml




UserDetails.java



HibernateTest.java



Please help me out if you can.
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a reason you think something went wrong with it? If so, what is that reason?
 
Arnob Dey
Ranch Hand
Posts: 34
Eclipse IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh,..Sorry my bad ! I forgot to mention the actual issue.

Exception in thread "main" org.hibernate.MappingNotFoundException: resource: org.hibernate.tutorials.model.dto.UserDetails not found
 
Mohammed Sardar.
Ranch Hand
Posts: 61
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think if there is a end for this thread, would help many basic hibernate search. I ended up with this same issue, by following the same tuto and spent much time. Finally, If we analyse the issue was resolved by changing all the hibernate jars to the latest. But the problem described above should show up with a detailed stack trace will give better understanding of what the error is.
 
Arnob Dey
Ranch Hand
Posts: 34
Eclipse IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Sorry for replying late. It's been so long that it fell off my radar. It seems I put '.class' at <mapping resource="org.hibernate.tutorials.model.dto.UserDetails.class"/> mistakenly. However, the code that I provided originally was actually the corrected version..lol.

Thanks, 
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!