We're updating the issue view to help you get more done. 

Hibernate is both logging and throwing the error: "HHH000346: Error during managed flush [org.hibernate.exception.ConstraintViolationException: could not execute statement]"

Description

The error started occurring for us when we upgraded hibernate versions from 4.2.21.FINAL to 5.3.4.FINAL. The logs say:

Error Log

thread="http-nio-8080-exec-297" level=ERROR logger=org.hibernate.internal.ExceptionMapperStandardImpl - HHH000346: Error during managed flush [org.hibernate.exception.ConstraintViolationException: could not execute statement]

They seem to occur when constraint violations happen and don't seem to have a direct adverse impact on callers. It looks like a potential anti-pattern/bug that is causing Hibernate, to both log and throw the error.

Environment

Hibernate Libraries: Hibernate: 5.3.4.FINAL
Java 8
Database Platform: Oracle

Status

Assignee

Unassigned

Reporter

Vydruth Pulluri

Fix versions

backPortable

None

Suitable for new contributors

None

Requires Release Note

Affirmative

backportDecision

None

Worked in

4.2.21

Components

Affects versions

5.3.4

Priority

Major