Hi,
I am getting following error when trying to delete a Hibernate Object (with one to many mappings).
2011-07-07 13:55:51,626 WARN [org.hibernate.util.JDBCExceptionReporter] (http-0.0.0.0-3390-2:) SQL Error: 3960, SQLState: S0005 2011-07-07 13:55:51,643 ERROR [org.hibernate.util.JDBCExceptionReporter] (http-0.0.0.0-3390-2:) Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'TestTableB' directly or indirectly in database 'TestDB' to update, delete, or insert the row that has been modified or deleted by another transaction. Retry the transaction or change the isolation level for the update/delete statement.
Sceanrio is :- I have an Object of TestTableA which contains list of TestTableB ( one to many relationship). When I am trying to delete TestTableA , I am getting snapshot isolation on child object. default-cascade for testTableA is "all-delete-orphan" .
This error occurs when multiple tasks are running on server and each task is updating TestTableB (but different rows). If all or some of tasks are stopped , delete works fine.
please can some one help me ???? I am using JBoss 5 and Jdk 6. Let me know if more information is required.
|