none
SQLException "The server failed to resume the transaction"

    Question

  •  

    Hello-

     

    A customer has reported getting the following excpetion in our logs, and I have never seen it before and wanted to see if there was any insight you could provide to understand when you throw this exception.

     

    The process is a "purging" process- it just executes a sequence of DELETE statements that should be fairly simple (delete a number of records from a table and CHECK some constraints, no cascading), after the sequence it commits.  All of this occurs on the same connection.  We use c3p0 for connection pooling.

     

    Here is the exception:

     

    2008-03-22 08:30:08,699 WARN        impl.NewPooledConnection : [c3p0] A PooledConnection that has already signalled a Connection error is still in use!

    2008-03-22 08:30:08,699 WARN        impl.NewPooledConnection : [c3p0] Another error has occurred [ com.microsoft.sqlserver.jdbc.SQLServerException: The server failed to resume the transaction. Desc:9f00000002. ] which will not be reported to listeners!

    com.microsoft.sqlserver.jdbc.SQLServerException: The server failed to resume the transaction. Desc:9f00000002.

                at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)

                at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)

                at com.microsoft.sqlserver.jdbc.SQLServerConnection.doConnectionCommand(Unknown Source)

                at com.microsoft.sqlserver.jdbc.SQLServerConnection$ConnectionCommandRequest.execute(Unknown Source)

                at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)

                at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectionCommand(Unknown Source)

                at com.microsoft.sqlserver.jdbc.SQLServerConnection.rollback(Unknown Source)

                at com.mchange.v2.c3p0.impl.NewProxyConnection.rollback(NewProxyConnection.java:855)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:50)

                at $Proxy15.rollback(Unknown Source)

                at

    Monday, March 24, 2008 3:51 PM

Answers

  • Hi Steve,

     

    I recommend upgrading to the current Microsoft SQL Server JDBC Driver 1.2, available from http://msdn2.microsoft.com/en-us/data/aa937724.aspx .  If that doesn't solve the issue, then check your T-SQL (including stored procedures) for COMMIT or ROLLBACK statements.  C3PO appears to use the JDBC API to manage transactions, which may cause the driver to get confused when combined with COMMIT or ROLLBACK T-SQL statements executed by the app.

     

    Please post back if this doesn't solve your problem.

     

    Regards,

    --David Olix [MSFT]

    Tuesday, March 25, 2008 4:59 AM

All replies

  • Hi Steve,

     

    I recommend upgrading to the current Microsoft SQL Server JDBC Driver 1.2, available from http://msdn2.microsoft.com/en-us/data/aa937724.aspx .  If that doesn't solve the issue, then check your T-SQL (including stored procedures) for COMMIT or ROLLBACK statements.  C3PO appears to use the JDBC API to manage transactions, which may cause the driver to get confused when combined with COMMIT or ROLLBACK T-SQL statements executed by the app.

     

    Please post back if this doesn't solve your problem.

     

    Regards,

    --David Olix [MSFT]

    Tuesday, March 25, 2008 4:59 AM
  • David,

     

    Thanks so much for the reply.  We also just use the JDBC API to handle transactions and do not execute any COMMIT or ROLLBACK statements in adhoc sql text submitted.  Is there a particular bugfix in 1.2 that impacts this circumstance?  Regression testing new drivers will take a huge amount of resources for this customer, and I would rather not do this if its only speculative.

     

    This customer (large bank) has some support agreement with MSFT.  If they were to open a ticket on this, what resources would you need typically for this.  Trace? or MSSQL profiler trace? or both?  I just want to get an idea of our options.

     

    Thanks again,

     

    Steve

    Tuesday, March 25, 2008 5:09 AM