On release of batch it still contained JDBC statements

After updating from 5.1.10 to 5.3.6 I’m starting to see the log message

On release of batch it still contained JDBC statements

I’ve debugged where that is getting logged and all I can find is a single statement which doesn’t

insert into EventLog (entityId, entityType, ipAddress, message, time, user, id) values (?, ?, ?, ?, ?, ?, ?)

But I can’t find where the associated values are stored (if there even are any).

Any suggestions in further tracking this down? The only insert that is being created is actually being persisted to the database.

Try to replicate it with this test case:


We’ll investigate it afterward.

@vlad unfortunately I haven’t been able to get it to trigger with simple test case. ( https://github.com/codylerum/hibernate-test-case-templates/blob/batch_statements/orm/hibernate-orm-5/src/test/java/org/hibernate/bugs/JPAUnitTestCase.java )

I’m going to try with a simple EE8 project. If I can get it to there maybe someone can help me reverse it back into a hiberate test.


I was able to reproduce this with a super simple Java EE8 project that will deploy on Wildfly 14.0.1.Final

Browsing to http://localhost:8080/demo and clicking execute you will see the log messages

21:17:40,824 INFO  [stdout] (default task-1) Executing

21:17:40,827 INFO  [org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl] (default task-1) HHH000010: On release of batch it still contained JDBC statements
21:17:40,827 ERROR [org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl] (default task-1) HHH000352: Unable to release batch statement...

If you cannot replicate it with our test case, it’s an integration issue.

Since you mentioned Wildfly, this issue is best addressed by the Wildfly team since it could be related to how the Session or the Transaction are handled.

Maybe @scott.marlow can help us with this issue.

Thanks @vlad I’ll fire up an issue on the Wildfly side.


1 Like

For anyone following along @scott.marlow investigated and suggested I open an HHH issue.


1 Like