I catch javax.persistence.OptimisticLockException , which works fine, but I get a stacktrace StaleObjectStateException in my server log. I checked, and getCause() on OptimisticLockException returns a StaleObjectStateException , but why is it printed on server.log? This is really annoying, I am writing a test where two threads modify the same object, and one of them throws an OptimisticLockException , which is expected, but getting a stacktrace StaleObjectStateException not what is required.
Thanks for your help!
source share