Hi!
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 StaleObjectStateException
is not what is wanted.
Thanks for your help!