javax.persistence.OptimisticLockException + org.hibernate.StaleObjectStateException
I'm catching javax.persistence.OptimisticLockException
which works great, but I'm getting the stacktrace of StaleObjectStateException
in my server log. I've checked and the getCause()
on OptimisticLockException
returns StaleObjectStateException
, but why is it printed out to server.log? It's really annoying, I'm writing a test, where two thread are modifying the same object, and one of the are throwing OptimisticLockException
which is expected, but getting stacktrace of StaleObjectState开发者_JS百科Exception
is not what is wanted.
Thanks for your help!
Looks like you've encountered #HHH-3442 (or one of it's duplicates). Update your Hibernate.
精彩评论