[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4106) SQLStateConverter treats SQLServer snapshot isolation exception as a SQLGrammarException

Anders Wallgren (JIRA) noreply at atlassian.com
Fri Aug 21 20:26:15 EDT 2009


SQLStateConverter treats SQLServer snapshot isolation exception as a SQLGrammarException
----------------------------------------------------------------------------------------

                 Key: HHH-4106
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4106
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.3.2
         Environment: SQL Server 2008, SQL Server 2005, jtds 1.2.2 JDBC driver
            Reporter: Anders Wallgren


A SQLException thrown due to a snapshot isolation conflict gets treated as a SQLGrammarException

The SQLState is S0005 and the vendorCode is 3960.  The error message is: Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.XXX' directly or indirectly in database 'XYZ' 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.

This should be turned into an optimistic locking exception, or something like that.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list