org.hibernate.HibernateException: connnection proxy not usable after transaction completion
今天yuan男神的程序报了这个错,
getHibernateTemplate().saveOrUpdate(obj);
getHibernateTemplate().flush();
getHibernateTemplate().refresh(obj);
在第2行报的:
org.hibernate.HibernateException: connnection proxy not usable after transaction completion
以为是hibernate事务的问题,还考虑了懒加载的原因,后来男神发现,是数据库的字段类型为int,实体类的字段类型是Date,这个字段应该是date类型的,save的时候也存放的是date类型,男神把库里的类型改成日期了,就OK啦。
org.hibernate.HibernateException: connnection proxy not usable after transaction completion的更多相关文章
- Exception in thread "main" org.hibernate.HibernateException: save is not valid without active transaction
在spring4+hibernate4整合过程中,使用@Transactional注解事务会报"Exception in thread "main" org.hibern ...
- 报错HTTP Status 500 - HHH000142: Javassist Enhancement failed: cn.itcast.entity.Customer; nested exception is org.hibernate.HibernateException: HHH000142: Javassist Enhancement failed: cn.itcast.entity.
报错 type Exception report message HHH000142: Javassist Enhancement failed: cn.itcast.entity.Customer; ...
- SSH dao层异常 org.hibernate.HibernateException: No Session found for current thread
解决方法: 在 接口方法中添加 事务注解 即可. public interface IBase<PK extends Serializable, T> { @Transactional v ...
- spring整合hibernate的时候报异常org.hibernate.HibernateException: createQuery is not valid without active transaction
在整合Spring4+hibernate4时候,当代码执行到dao中CRUD操作时,报了一个异常, org.hibernate.HibernateException: createQuery is n ...
- org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not a ...
- org.hibernate.HibernateException: No Session found for current thread
spring.springmvc和hibernate整合 在sessionFactory.getCurrentSession()时,出现以下异常 No Session found for curren ...
- org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance:
详细错误堆栈信息: org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" ...
- 问题Initial SessionFactory creation failed.org.hibernate.HibernateException: /hibernate.cfg.xml not found解决方法
问题Initial SessionFactory creation failed.org.hibernate.HibernateException: /hibernate.cfg.xml not fo ...
- 使用hibernate时出现 org.hibernate.HibernateException: Unable to get the default Bean Validation factory
hibernate 在使用junit测试报错: org.hibernate.HibernateException: Unable to get the default Bean Validation ...
随机推荐
- grep与孪生兄弟egrep差异
egrep是对grep的功能扩展,让其支持正则更加完美! #grep与egrep不同 egrep完全支持正则 ls |grep -i '[a-z]\{3\}' === ls |egrep -i ...
- 在Asp.Net MVC中使用Repeater控件
使用Repeater控件在视图中展示图表信息,Repeater控件的使用概述: <asp:Repeater ID="Repeater1" runat="server ...
- rinetd 一个linux下的端口转发工具
inux下使用iptables实现端口转发,配置较为复杂,使用rinetd工具可以实现快速配置和修改端口转发. 例:本机ip:1.1.1.1 需要实现访问本机的8080端口,自动转发到2.2.2.2 ...
- Centos7.x 执行top命令教程
一.作用 top命令用来显示执行中的进程,使用权限是所有用户 二.格式 top [-] [d delay] [q] [c] [S] [s] [i] [n] 三.命令参数解释 d:指定更新的间隔,以秒计 ...
- 【30集iCore3_ADP出厂源代码(ARM部分)讲解视频】30-12底层驱动之液晶画点驱动
视频简介:该视频介绍iCore3应用开发平台中液晶驱动的方法. 源视频包下载地址:链接:http://pan.baidu.com/s/1qXQoOQo 密码:gvgo 银杏科技优酷视频发布区:http ...
- APACHE多个服务器的配置
APACHE 多个服务器的配置? 网站目录:d:www 下设两个站点:1.D:wwwszbw 2.D:wwwweb 注意前面,要开启 Vhost 及 vhos 相关 so <VirtualHo ...
- Git之右键没有Git Bash Here的解决办法
1.Win+R 打开运行输入regedit 回车打开注册表 2.找到[HKEY_CLASSES_ROOT\Directory\Background]. 3.在[Background]下如果没有[she ...
- 嵌入式开发之UDP 丢包--- UDP 丢包控制方法
0. 发送端可以,发送五次左右,再Sleep 1.调用recv方法接收端收到数据后,处理数据花了一些时间,处理完后再次调用recv方法,在这二次调用间隔里,发过来的包可能丢失.对于这种情况可以修改接收 ...
- 深度解析Java 8:JDK1.8 AbstractQueuedSynchronizer的实现分析
深度解析Java 8:JDK1.8 AbstractQueuedSynchronizer的实现分析(上) 深度解析Java 8:AbstractQueuedSynchronizer的实现分析(下) A ...
- 零基础 Vue 开发环境搭建 打开运行Vue项目
[相关推荐]IntellIJ IDEA 配置 Vue 支持 打开Vue项目 所需文件 node.js环境(npm包管理器)(node-v8.11.3-x64.msi)(npmV5.6.0) cnpm ...