# Hibernate-core version \>= 5.6.1-Final breaks batching

**URL:** <https://discourse.hibernate.org/t/hibernate-core-version-5-6-1-final-breaks-batching/6306>\
**Category:** Hibernate ORM\
**Created:** [May 6, 2022, 10:02am UTC](https://discourse.hibernate.org/t/hibernate-core-version-5-6-1-final-breaks-batching/6306 "2022-05-06T10:02:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntiBit82](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/antibit82/32/1878_2.png) [@AntiBit82](https://discourse.hibernate.org/u/AntiBit82)\
**Post date:** [May 6, 2022, 10:02am UTC](https://discourse.hibernate.org/t/hibernate-core-version-5-6-1-final-breaks-batching/6306/1 "2022-05-06T10:02:51Z")

</div>

Ok so I’m a dev in my company and created part of a batch processing chain using hibernate-core: 5.4.5.Final. We’re dealing with excessive amounts of data and we’re using Postgres and Oracle DBs.

Few days ago I said ok, time to upgrade dependencies. So I went from 5.4.5.Final to 5.6.7.Final (last version which supports our Java 8).

Afterwards we noticed that a job took 25 mins instead of 3 min 30!  
So after painful analysis and log tracing I realized that batch inserting & updating stopped working.  
I continued to check different versions of Hibernate to see where exactly the break happens, and it turns out that version 5.6.0.Final is the last working version. From then on batching simply won’t do, and I don’t know why…

I tracked the thing down using

> DEBUG logging of org.hibernate.engine.jdbc.batch.  
> Version 5.6.0.Final prints a lot of statements like “Reusing batch statement” and “Executing batch size: 499”

Successive versions don’t print anything. Cause it won’t do it anymore, making everything painfully slow.  
Nobody else ever had this issue?

---

<div class="post-metadata">

**Author:** ![dreab8](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/dreab8/32/25_2.png) [@dreab8](https://discourse.hibernate.org/u/dreab8)\
**Post date:** [May 6, 2022, 10:19am UTC](https://discourse.hibernate.org/t/hibernate-core-version-5-6-1-final-breaks-batching/6306/2 "2022-05-06T10:19:57Z")

</div>

Hi @AntiBit82 ,

I see that 5.6.1 version contains [[HHH-14901] - Hibernate JIRA](https://hibernate.atlassian.net/browse/HHH-14901) that may be the cause of the batch processing stop working. Can you please open a Jira ticket with a reproducer?

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![AntiBit82](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/antibit82/32/1878_2.png) [@AntiBit82](https://discourse.hibernate.org/u/AntiBit82)\
**Post date:** [May 6, 2022, 10:54am UTC](https://discourse.hibernate.org/t/hibernate-core-version-5-6-1-final-breaks-batching/6306/3 "2022-05-06T10:54:24Z")

</div>

Hi,  
well… I would, if I knew where or how…

---

<div class="post-metadata">

**Author:** ![dreab8](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/dreab8/32/25_2.png) [@dreab8](https://discourse.hibernate.org/u/dreab8)\
**Post date:** [May 6, 2022, 11:16am UTC](https://discourse.hibernate.org/t/hibernate-core-version-5-6-1-final-breaks-batching/6306/4 "2022-05-06T11:16:53Z")

</div>

This is the place where you can open a Jira ticket [Hibernate ORM - Issues - Hibernate JIRA](https://hibernate.atlassian.net/jira/software/c/projects/HHH/issues/HHH-15253) and here a project that can help you create a test case [GitHub - hibernate/hibernate-test-case-templates: Templates and examples to report issues to Hibernate](https://github.com/hibernate/hibernate-test-case-templates/)

---

<div class="post-metadata">

**Author:** ![AntiBit82](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/antibit82/32/1878_2.png) [@AntiBit82](https://discourse.hibernate.org/u/AntiBit82)\
**Post date:** [May 6, 2022, 2:12pm UTC](https://discourse.hibernate.org/t/hibernate-core-version-5-6-1-final-breaks-batching/6306/5 "2022-05-06T14:12:29Z")

</div>

Ok thx, I did my best to create some understandable issue:  
[https://hibernate.atlassian.net/browse/HHH-15254](https://hibernate.atlassian.net/browse/HHH-15254)

Maybe it’s just an error on my side, who knows. Though I wouldn’t expect a version upgrade to break existing functionality, but as we all know… 🥸
