这是hibernate的一个bug,具体看https://hibernate.atlassian.net/browse/HHH-11732?attachmentViewMode=list

When using stateless session with jdbc batch size we get an

HHH000352: Unable to release batch statement..

error in session.close() after rollback:

Code:
Configuration cfg = new Configuration();
cfg.setProperty(Environment.STATEMENT_BATCH_SIZE, "10");
factory = cfg.configure().buildSessionFactory();

StatelessSession session = factory.openStatelessSession();
Transaction tx = session.beginTransaction();

Employee employee = new Employee("1", "2", 1);
employee.setId(id++);
session.insert(employee);

tx.rollback();

session.close();

In rollback the statements are closed but still remain in the jdbc batch,
which is trying to close them a second time on session.close().

5.2.11.Final版本已经修复了这个问题

Hibernate - HHH000352: Unable to release batch statement的更多相关文章

  1. 使用hibernate时出现 org.hibernate.HibernateException: Unable to get the default Bean Validation factory

    hibernate 在使用junit测试报错: org.hibernate.HibernateException: Unable to get the default Bean Validation ...

  2. juit测试中报错:org.hibernate.HibernateException: Unable to get the default Bean Validation factory

    org.hibernate.HibernateException: Unable to get the default Bean Validation factory 解决方法: 解决方案: 在hib ...

  3. HTTP Status 500 - Request processing failed; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement

    1.什么操作出现:当我在项目中添加产品或者修改时,浏览器出现HTTP Status 500 - Request processing failed; nested exception is org.h ...

  4. Caused by:org.hibernate.HibernateException:Unable to make JDBC Connection

    1.错误描述 Caused by:org.hibernate.HibernateException:Unable to make JDBC Connection[jdbc\:mysql\://loca ...

  5. Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable t

    spring与hibernate整合然后出现如下错误: org.springframework.beans.factory.BeanCreationException: Error creating ...

  6. Spring JUnit org.hibernate.HibernateException: Unable to get the default Bean Validation factory

    org.hibernate.HibernateException: Unable to get the default Bean Validation factory <property nam ...

  7. org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]

    使用Hibernate 插入List数据时出现了以下异常: SLF4J: The requested version 1.6 by your slf4j binding is not compatib ...

  8. Caused by: org.hibernate.HibernateException: Unable to build the default ValidatorFactory

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testAction': ...

  9. org.hibernate.QueryException: Unable to resolve path [SecWilldosetdate.name],xxxxxxxx...异常处理

    今天在写hql语句的时候出现了这个错误,然后一直运行到执行hql这儿就出错了.页面报500. 原hql如下: String hql = "from SecWilldosetdate wher ...

随机推荐

  1. 2.初始化spark

    参考:  RDD programming guide http://spark.apache.org/docs/latest/rdd-programming-guide.html  SQL progr ...

  2. Ignite-Spark

    2017.12.02 Ignite-Spark 讲ppt的时候还是很紧张 PPT地址 https://files.cnblogs.com/files/swobble/Spark.pptx

  3. 五. Arrow Function 箭头函数

    箭头函数三大好处: 1. 简明的语法 举例: 如果只有一个参数,可以不加(),多个参数用 "," 隔开 2. 隐式返回 首先说下什么是显示返回,显示返回就是 return 加上你要 ...

  4. MongDB4.0-入门学习之运算符

    MongDB 4.0 入门学习之运算符 基本语法:db.collection.find({<key>:{$symbol:<value>}}) 条件查询匹配运算符 符号 描述 范 ...

  5. EazyUI_Datagrid_行内编辑(editor)的combobox下拉框带图片

    1.业务需求: 商品的明细列表里面下拉框需要 [图片+文字 ] 显示 2.我们使用的是EazyUI,而我比较懒,不习惯用拼接html来显示列表页面,使用的是eazyui的数据网格(datagrid) ...

  6. 洛谷P5341 [TJOI2019]甲苯先生和大中锋的字符串

    原题链接P5341 [TJOI2019]甲苯先生和大中锋的字符串 题目描述 大中锋有一个长度为 n 的字符串,他只知道其中的一个子串是祖上传下来的宝藏的密码.但是由于字符串很长,大中锋很难将这些子串一 ...

  7. 19-11-10-Night

    关于$Miemeng$,它死了. 大家有没有记得我在暑假里曾经写过一个著名模数? const int Mod=998224353; 现在有续集了(捂脸)(改不过题.jpg) const int Mod ...

  8. github上创建java项目简单操作

    github上创建java项目简单操作 参考L: github上创建java项目简单操作 - CSDN博客http://blog.csdn.net/qq_29392425/article/detail ...

  9. 83 落单的数 II

    原题网址:http://www.lintcode.com/zh-cn/problem/single-number-ii/ 给出3*n + 1 个的数字,除其中一个数字之外其他每个数字均出现三次,找到这 ...

  10. iOS开发UIView.h简介

    1.UICoordinateSpace不同坐标空间的坐标切换 @protocol UICoordinateSpace <NSObject> //将当前的坐标空间点转换到指定的坐标空间 - ...