org.hibernate.AssertionFailure: null id in xxx (don't flush the Session after an exception occurs)
来源:互联网 发布:淘宝运营大概多少提成 编辑:程序博客网 时间:2024/06/01 10:47
由于我在开发过程当中多次碰到这样的问题,但总是没有找出最终导致这个问题发生的原因,通过google和我自己的发现,主要有以下几种原因会导致这个问题的发生
1,表中使用了数据库的关键字
2,使用hibernate的默认连接池,使用连接池没有closeSession,包括查询,插入,更新等一切使用连接池操作,未关闭连接都可能出现这个问题
3,网上查找资料说hibernate3.0中commit操作flush存在问题,有个bug,目前已经将hibernate升级至3.5,目前数据能正常插入
4、应该是你的数据库不能为空的字段得不不到你传进的值.
5、配置文件有误。
目前我发现主要就是以上几种原因,估计出现次数最多的应该是使用了关键字和连接关闭问题
- org.hibernate.AssertionFailure: null id in xxx (don't flush the Session after an exception occurs)
- org.hibernate.AssertionFailure: null id in entry (don't flush the Session after an exception occurs)
- org.hibernate.AssertionFailure: null id in entry (don't flush the Session after an exception occurs)
- org.hibernate.AssertionFailure: null id in xxx entry (don't flush the Session after an except)解决方法
- null id in entry (don't flush the Session after an exception occurs)
- null id in entry (don't flush the Session after an exception occurs) 解决方法
- null id in entry (don't flush the Session after an exception occurs)
- null id in entry (don't flush the Session after an exception occurs)的错误
- null id in XXXentity (don't flush the Session after an exception occurs。。。。(HIbernate 实体类包含关键字)
- null id in com.hfxt.entity.User entry (don't flush the Session after an exception occurs)
- org.hibernate.AssertionFailure: null id in com.fy.domain.GoodPO entry (don't flush the Session after
- org.hibernate.AssertionFailure: null id in com.you.model.User entry (don't flush the Session after a
- org.hibernate.AssertionFailure: null id in net.test.entity.test entry (don't flush the Session
- don't flush the Session after an exception occurs异常
- don't flush the Session after an exception occurs
- don't flush the Session after an exception occurs
- null id in org.htss.messageservice.pojo.Task entry (don't flush the Session after an exception occur
- org.hibernate.AssertionFailure:null id in com.base.program.entity.X entry (don't flush the Session)
- 现代软件构建系统的使用 CMake简介
- Tomcat源码阅读,标记下。
- Android 加载服务器上的图片
- struts+spring action应配置为scope="prototype"
- Customizing the GNOME Shell
- org.hibernate.AssertionFailure: null id in xxx (don't flush the Session after an exception occurs)
- HDOJ 2871 Memory Control 区间合并线段树
- 网络Excel应用
- iphone 视频开发笔记
- 分享到twitter,facebook,google,yahoo,linkedined,msn
- java电子书下载网站
- 大数除法 判断能否整除
- 简单JNI实例
- 更改UITabBar的“更多”导航样式