有时,我在执行存储过程时从SQL Server 2005获得以下内容:
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot roll back T1. No transaction or savepoint of that name was found. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(Unknown Source) at com.mchange.v2.c3p0.impl.NewProxyCallableStatement.executeUpdate(NewProxyCallableStatement.java:2160) at com.sm.persistence.dao.TransactionRejectDAO.callSpMoveTransaction(TransactionRejectDAO.java:631) ... 6 more
有什么想法吗?
当连接池机制尝试关闭准备好的语句时:
Nov 9, 2009 9:32:55 AM com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement close WARNING: SQLServerPreparedStatementID:201 ( ConnectionID:139 TransactionID:0x1A00000039000000): Error (ignored) closing PreparedHandle:0 com.microsoft.sqlserver.jdbc.SQLServerException: The server failed to resume the transaction. Desc:390000001a. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source) at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(Unknown Source) at com.microsoft.sqlserver.jdbc.TDSParser.parse(Unknown Source) at com.microsoft.sqlserver.jdbc.TDSParser.parse(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$1PreparedHandleClose.doExecute(Unknown Source) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.closePreparedHandle(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.close(Unknown Source) at com.mchange.v1.db.sql.StatementUtils.attemptClose(StatementUtils.java:41) at com.mchange.v2.c3p0.stmt.GooGooStatementCache.synchronousDestroyStatement(GooGooStatementCache.java:413) at com.mchange.v2.c3p0.stmt.GooGooStatementCache.closeAll(GooGooStatementCache.java:351) at com.mchange.v2.c3p0.impl.NewPooledConnection.closeAllCachedStatements(NewPooledConnection.java:673) at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:543) at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:234) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470) at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547) Nov 9, 2009 9:32:55 AM com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement close WARNING: SQLServerPreparedStatementID:186 ( ConnectionID:139 TransactionID:0x1A00000039000000): Error (ignored) closing PreparedHandle:0
存储过程包含嵌套事务T1,我认为这是不必要的。这可能是问题吗?
由于