关于An association from the tablea refers to an unmapped classB

 1,A表中引用B中字段

检查B的hibernate.cfg.xml文件中是否添加了  <mapping resource="xxxx.hbm.xml"/> 
2,检查你的hibernate.cfg.xml文件中的相关联的两个<mapping resource=""/>的顺序,可能有其中一个需要引用另一个,但是另一个却还没有编译,就是说被用作外键的表要放在前面
3,检查你的*.hbm.xml文件名是否正确
4, 检查你的*.hbm.xml里面类全名 

5 检查引用字段是否被更换

原文地址:https://www.cnblogs.com/dss1025/p/9209874.html