Hibernate throws strange error: Class is not mapped

I’d expect one of two things to be the reason:

  1. either you don’t have Payment listed in your hibernat.cfg.xml or where ever you config your mapped classes.

  2. another reason might be the confusion between javax…Entity and org.hibernate….Entity. Make sure you use the first one.

Leave a Comment