1.简要错误信息
Exception executing batch:
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException:
2.原因
当执行更新或删除数据库时,数据库中已不存在这条数据。
3.这种情况举例
如多个线程同时删除同一条数据时,其中一个线程查到数据后,执行删除(查询时数据还存在,但删除操作提交时,已被其他线程删除掉)