As lsidroGH said, util.JDBCExceptionReporter
is not an exception, it's a log message. It logs both SQLExceptions
and SQLWarnings
. There is no problem with your code, as one thread will have a save()
call that returns true
and the other thread's save()
will get false
.
If you don't want this message to show up in your logs, you will need to increase your log level for org.hibernate.util.JDBCExceptionReporter
from ERROR
to FATAL
but this will potentially exclude valid exceptions you would want logged. Your best bet is to ignore it, as your code works.