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 , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: