org.hibernate.MappingException: An association from the table order_intem_inf refers to a unmapped
执行一个HIbernate的演示样例时出现例如以下错误信息
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.hibernate.utils.HibernateUtil.<clinit>(HibernateUtil.java:21)
at org.hibernate.samples.PersonManager.main(PersonManager.java:23)
Caused by: org.hibernate.MappingException: An association from the table order_intem_inf refers to an unmapped class: Product
at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1805)
at org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1739)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1424)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1844)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1928)
at com.hibernate.utils.HibernateUtil.<clinit>(HibernateUtil.java:16)
... 1 more
从出错信息可知类Product没有被映射到,可是明明Product.hbm.xml文件存在,而且mapping信息也填写了啊,后来检查发现是在还有一个引用到它的地方仅仅写"Product"而不是完整的路径名。
org.hibernate.MappingException: An association from the table order_intem_inf refers to a unmapped的更多相关文章
- 关于映射异常org.hibernate.MappingException: An association from the table DUTY_INFO refers to an unmapped class: com.pms.entities.other.Department的原因。
在编程过程当中由于修改过了包名. 原来的包名是: com.pms.entities.base 然后改为了:com.pms.entities.other 当我重新映射生成数据表的时候就报错:org.hi ...
- org.hibernate.MappingException: Could not determine type for: java.util.List, at table: user, for...
异常详情: Caused by: org.hibernate.MappingException: Could not determine type for: java.util.List, at ta ...
- 在Hibernate中配置Hilo进行数据绑定测试时出错:org.hibernate.MappingException: Could not instantiate id generator
在进行学习具体类单表继承时使用hilo类型时总是在调度过程中提示如下信息,无法通过.留下记录备查. 在网上找相关信息, 未解决,详细如下: org.hibernate.MappingException ...
- 疑难杂症:org.hibernate.MappingException: Unknown entity,annotation配置Entity类报错
引言: 夜声人静,外面下着稀里哗啦的雨,周末的晚上,还在键盘上舞动手指. 此刻很感激一个人一篇随笔,感谢xiaochao以及他的<org.hibernate.MappingException: ...
- Hibernate注解错误之- org.hibernate.MappingException: Could not determine type for:
Hibernate 注解 @OneToOne 时候,出现以下错误,经调试,发现 注解要么全部放在字段上,要么全部放在get方法上,不能混合使用! org.hibernate.MappingExcept ...
- hibernate异常:org.hibernate.MappingException
这个是映射文件配置错误 异常:org.hibernate.MappingException 提示:Could not determine type for: java.lang,String, at ...
- org.hibernate.MappingException
1.错误描述 org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'sessio ...
- org.hibernate.MappingException: Unknown entity
org.hibernate.MappingException: Unknown entity 原因1: 异常是因为使用注解的时候没有导入正确的包.要清楚,Entity包是javax.persisten ...
- 令人哭笑不得的org.hibernate.MappingException: Unknown entity
今天处理的任务是从一套系统中分离出微信易信功能代码添加到另一套系统中..本来是一个很简单的任务,但是分离移植过去后,一运行报了个错: nested exception is org.hibernate ...
随机推荐
- VIM块操作
一.可视模式 按v启用可视模式,之后移动光标可以选择. 如: 如果想整行操作,则用大写的V,再移动光标可以按行为单位进行选择. 二.列块操作 在 word中有一个功能,按alt加鼠标拖动,可以 ...
- Bzoj2120/洛谷P1903 数颜色(莫队)
题面 Bzoj 洛谷 题解 考虑对操作离线后分块处理询问操作(莫队算法),将询问操作按照编号分块后左端点第一关键字,右端点第二关键字排序(分块大小为\(n^{\frac 23}\)),对于每一个询问操 ...
- django之cookie、session和ajax
1 Cookie cookie是什么? 保存在客户端浏览器上的键值对 {k:v} cookie依附在请求头或响应头中出现 发送请求时,会自动携带自己网站的cookie 应用: 实现登录 投票 1. ...
- bzoj 1779
较水的网络流. /************************************************************** Problem: 1779 User: idy002 L ...
- hdu 3081
二分答案,网络流是否满流判断合法性. #include <cstdio> #include <cstring> #include <queue> #include ...
- Unity ScriptObject创建Asset文件
创建ScriptObject可以创建带序列化的资源,只保存数据不用绑定在游戏对象上.创建出来的本子资源可以通过资源加载到游戏里使用.这里介绍一下使用Resources加载. 创建好的asset文件也可 ...
- 探究react-native 源码的图片缓存
先看js端图片使用的三种方式,依次排序1.2.3 <Image source={{uri:url}} style={{width:200,height:200}}/> 1. 加载远程图片 ...
- How to make a combo box with fulltext search autocomplete support?
I would like a user to be able to type in the second or third word from a TComboBoxitem and for that ...
- C++输出上三角/下三角/菱形/杨辉三角形
1.输出上三角形 第一行1个星,第二行3个星,第三行5个星,第四行7个星,第五行9个星. 分析:三角形的形状由输出的空白和星组成,通过分析每一行输出几个空格,几个星,就可完成输出三角形的工作. #in ...
- TSL / SSL
参考: http://www.ruanyifeng.com/blog/2014/09/illustration-ssl.html http://www.tuicool.com/articles/IJ3 ...