Monday, April 2, 2012

org.hibernate.MappingException: unmapped class

org.hibernate.MappingException: An association from the table USER refers to an unmapped class: Address
at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1824)
at org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1756)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1423)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1856)
at util.SessionUtil.<clinit>(SessionUtil.java:10)
... 1 more

Reason: The address class specified in not existing or the FQCN is not correct or the mapping file is not available for the Address class. Correct the issues by placing the class in appropriate package or specify the correct fully qualified class name or create mapping file.

No comments:

Post a Comment