If StaleObjectStateException is thrown when Hibernater runs doStaticUpdate or doStaticDelete, it is wrapped and returned as ObjectOptimisticLockingFailureException from JPA vender in Springframework.
This exception occurs when a synchronicity problem occurs inside an application, but is the same as the exception that occurs when you use the @Version annotation and when hibernation is handled internally.
However, since hibernation is not capable of handling concurrency in all situations, I think it is important to inform developers of the concurrency exceptions raised internally by hibernation through other appropriate means.
I think this is a big enough problem to confuse developers.
Comment From: snicoll
@wonyongChoi05 thanks for the report but I am not sure I understood what you think is the problem. To make sure we're on the same page, please share a small sample that we can run ourselves that reproduces the scenario you've described. You can attach a zip to this issue or push the code to a separate GitHub repository.