Duplicated Error Information Displayed in the Log

Hello!

I’ve noticed that Hibernate prints some duplicated information into the log when a save operation fails (for example due to a trigger failure).

Here[1] it can be seen that the error is logged when catching the exception, but also the sqlExceptionHelper process the exception stack, printing the error messages.

Here you can find an example of the log I’m obtaining (having Oracle as the underlying database):

104788 [http-bio-8080-exec-5] ERROR org.hibernate.engine.jdbc.batch.internal.BatchingBatch - HHH000315: Exception executing batch [java.sql.BatchUpdateException: ORA-20000: @20532@
ORA-06512: at “TAD_HB.AD_WINDOW_MOD_TRG”, line 78
ORA-04088: error during execution of trigger ‘TAD_HB.AD_WINDOW_MOD_TRG’
], SQL: update AD_Window set Updated=?, UpdatedBy=?, Name=? where AD_Window_ID=?
104806 [http-bio-8080-exec-5] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - ORA-20000: @20532@
ORA-06512: at “TAD_HB.AD_WINDOW_MOD_TRG”, line 78
ORA-04088: error during execution of trigger ‘TAD_HB.AD_WINDOW_MOD_TRG’

104806 [http-bio-8080-exec-5] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - ORA-20000: @20532@
ORA-06512: at “TAD_HB.AD_WINDOW_MOD_TRG”, line 78
ORA-04088: error during execution of trigger ‘TAD_HB.AD_WINDOW_MOD_TRG’

What do you think? Is this something reported before? I have been able to reproduce this both with Hibernate 3.6 and 5.3.

Thank you in advance.

[1] https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/engine/jdbc/batch/internal/BatchingBatch.java#L127

Please create a Jira issue for it. Thanks.

Done: https://hibernate.atlassian.net/browse/HHH-12688

Thanks!

Hello!

I’ve seen that you have fixed the issue. Thanks for fixing it on so short notice!

Is there any scheduled date for the release of Hibernate version 5.3.2?

Regards

It will be released very soon. Stay tuned.

1 Like