开发者

javax.persistence.OptimisticLockException + org.hibernate.StaleObjectStateException

开发者 https://www.devze.com 2023-01-11 12:43 出处:网络
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 Optimistic

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号