nimana – weblog

Hibernate MappingException: persistent class not known

leave a comment »

Caused by: org.hibernate.MappingException: persistent class not known: …

The root of this exception is, that the entity hibernate is trying to load, is either not configured at all or not configured correctly. Check the following, if you encounter this exception:

  • The entity is mapped correctly in the hibernate.cfg.xml.
  • If annotations are being used, the entity in question is annotated and annotated correctly as pointed out here.

If you see: “Caused by: org.hibernate.MappingException: Association references unmapped class XYZ…”, make sure, that the class XYZ is configured correctly and check the steps above.

Written by nimana

May 24, 2010 at 9:32 pm

Posted in Tech

Tagged with , , ,