关于An association from the table refers to an unmapped class
今天配置SSH框架的时候出现这个异常,找了很久,才发现原来是是实体类映射文件中的<class name="Role" table="role">的name值写错了,这里总结了一些网上的常见错误原因:
1,检查你的hibernate.cfg.xml文件中是否添加了 <mapping resource="xxxx.hbm.xml"/>
2,检查你的hibernate.cfg.xml文件中的相关联的两个<mapping resource=""/>的顺序,可能有其中一个需要引用另一个,但是另一个却还没有编译,就是说被用作外键的表要放在前面
3,检查你的*.hbm.xml文件名是否正确
4, 检查你的*.hbm.xml里面类全名
转载于:https://www.cnblogs.com/gongchenglion/p/5216520.html
关于An association from the table refers to an unmapped class相关推荐
- 关于An association from the tablea refers to an unmapped classB
1,A表中引用B中字段 检查B的hibernate.cfg.xml文件中是否添加了 <mapping resource="xxxx.hbm.xml"/> 2,检查你 ...
- org.hibernate.MappingException:An association from the table XX refers to an unmapped class
Hibernate多对一的时候遇到如下问题: org.hibernate.MappingException: An association from the table J_Product refer ...
- 映射异常: An association from the table TBL_TRAIN_COURSE_MONTH_PLAN refers to an unmapped class
关联时,要注意: <many-to-one name="user_id" column="user_id" class="xxxx.TbUser ...
- refers to an unmapped class
org.hibernate.MappingException: An association from the table ADMIN_LOG refers to an unmapped class: ...
- An association from the table yi_community refers to an unmapped class: com。yiyi.domain.YiGroup
很多人说是hbm.xml和类名的问题,我查了很久,感觉自己写得很对啊,后来才发现是class="某类"的时候类前面报名的某个点写成了英文,这感觉不好查啊,写出来跟大家分享,希望不要 ...
- hibernate 多对多(many-to-many)
多对多(many-to-many):在操作和性能方面都不太理想,所以多对多的映射使用较少,实际使用中最好转换成一对多的对象模型:hibernate会为我们创建中间关联表,转换成两个一对多. 1. E- ...
- hibernate常见错误及解决方法总结
1.org.hibernate.PropertyNotFoundException: field [cid] not found on org.sihai.shop.categorySecond.Ca ...
- eclipse中hibernate和mybatis中xml配置文件的没有标签提醒解决方法
当我们使用eclipse编写Mybatis或hibernate的xml文件时,面对众多标签的配置文件,却没有自动提醒,对于工作和学习都十分不方便. 之所以没有自动提醒,是因为dtd文件没有加载成功. ...
- NHibernate 异常及解决办法(长期添加中)
Mapping 错误: 1) Could not determine type for:Namespance.Class,AssemblyName, for columns: NHibernate.M ...
最新文章
- 设置Web页面试用手机浏览器(iphone)
- (转)OL记载Arcgis Server切片
- 后起之秀,《你好,李焕英》,票房已过十个亿和唐探三哪个好?
- 图片阴影怎么设置_HTML5 给图形绘制阴影
- log4j使用和配置详解
- pytorch代码阅读、代码学习
- ASP.NET 中处理客户端数字证书
- 已知空间中的三点 求三角形面积_高中数学:解三角形最值问题的四大模型
- 计算机和电脑键盘进水怎么办,笔记本键盘进水了怎么办?处理笔记本电脑键盘进水的小妙招...
- 大话设计模式之爱你一万年:第三章 创建型模式:工厂模式:我想让你坐在宝马里笑:1.工厂模式概念
- 全国海选第四期:北京和海外赛区(视频)
- 一个农村博士的独白:全家为什么只有我读到了博士
- 查询Linux中CPU的核数
- 【知识分享】C语言的设计模式——责任链、观察者
- 利用Kmeans聚类进行用户分层分析
- 递归算法和文件队列算法----实现多级文件夹的遍历,删除和复制操作
- 于 HTML5 WebGL 的民航客机飞行监控系统
- 晨控CK-GW208-EC与欧姆龙PLC工业EtherCAT协议通讯指南
- Self-examination 自学考试 大学生自考 Students Self And Self Books 自考图书
- Multisim的使用及面包板