zoukankan      html  css  js  c++  java
  • org.hibernate.HibernateException: connnection proxy not usable after transaction completion

    今天yuan男神的程序报了这个错,

    1 getHibernateTemplate().saveOrUpdate(obj);
    2 getHibernateTemplate().flush();
    3 getHibernateTemplate().refresh(obj);

    在第2行报的:

    org.hibernate.HibernateException: connnection proxy not usable after transaction completion

    以为是hibernate事务的问题,还考虑了懒加载的原因,后来男神发现,是数据库的字段类型为int,实体类的字段类型是Date,这个字段应该是date类型的,save的时候也存放的是date类型,男神把库里的类型改成日期了,就OK啦。

  • 相关阅读:
    重要的环境变量
    常用的转义字符
    常用系统工作命令
    栈 队列 和 双向队列
    时间
    默认值字典
    Counter
    random
    22 内置常用模块01
    super
  • 原文地址:https://www.cnblogs.com/mySummer/p/5302248.html
Copyright © 2011-2022 走看看