No ongoing transaction. Did you forget to call multi?

 

2016-10-21 14:41:47,551 [ERROR] [http-nio-8032-exec-2] TransactionSynchronizationUtils:171 - TransactionSynchronization.afterCompletion threw exception
org.springframework.dao.InvalidDataAccessApiUsageException: No ongoing transaction. Did you forget to call multi?
at org.springframework.data.redis.connection.jedis.JedisConnection.exec(JedisConnection.java:756)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.data.redis.core.RedisConnectionUtils$ConnectionSplittingInterceptor.invoke(RedisConnectionUtils.java:357)
at org.springframework.data.redis.core.RedisConnectionUtils$ConnectionSplittingInterceptor.intercept(RedisConnectionUtils.java:335)
at org.springframework.data.redis.core.RedisConnectionUtils$ConnectionSplittingInterceptor.invoke(RedisConnectionUtils.java:365)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
at com.sun.proxy.$Proxy264.exec(Unknown Source)
at org.springframework.data.redis.core.RedisConnectionUtils$RedisTransactionSynchronizer.afterCompletion(RedisConnectionUtils.java:290)
at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCompletion(TransactionSynchronizationUtils.java:168)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.invokeAfterCompletion(AbstractPlatformTransactionManager.java:1001)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:976)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:806)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:485)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
at com.sun.proxy.$Proxy127.getList(Unknown Source)

 

    /**
     * Actually invoke the {@code afterCompletion} methods of the
     * given Spring TransactionSynchronization objects.
     * @param synchronizations List of TransactionSynchronization objects
     * @param completionStatus the completion status according to the
     * constants in the TransactionSynchronization interface
     * @see TransactionSynchronization#afterCompletion(int)
     * @see TransactionSynchronization#STATUS_COMMITTED
     * @see TransactionSynchronization#STATUS_ROLLED_BACK
     * @see TransactionSynchronization#STATUS_UNKNOWN
     */
    public static void invokeAfterCompletion(List<TransactionSynchronization> synchronizations, int completionStatus) {
        if (synchronizations != null) {
            for (TransactionSynchronization synchronization : synchronizations) {
                try {
                    synchronization.afterCompletion(completionStatus);
                }
                catch (Throwable tsex) {
                    logger.error("TransactionSynchronization.afterCompletion threw exception", tsex);
                }
            }
        }
    }

 

时间: 2024-09-20 08:14:34

No ongoing transaction. Did you forget to call multi?的相关文章

分布式事务系列(3.2)jotm分布式事务源码分析

1 系列目录 分布式事务系列(开篇)提出疑问和研究过程 分布式事务系列(1.1)Spring事务管理器PlatformTransactionManager源码分析 分布式事务系列(1.2)Spring事务体系 分布式事务系列(2.1)分布式事务模型与接口定义 分布式事务系列(3.1)jotm的分布式案例 分布式事务系列(3.2)jotm分布式事务源码分析 分布式事务系列(4.1)Atomikos的分布式案例 2 了解xapool 我们在前一篇文章中了解到jotm配合xapool共同完成了分布式事

ORACLE快速彻底Kill掉的会话

在ORACLE数据库当中,有时候会使用ALTER SYSTEM KILL SESSION 'sid,serial#'杀掉一个会话进程,但是使用这个SQL语句杀掉会话后,数据库并不会立即释放掉相关的资源,有时候你会发现锁定的资源很长时间 也不会释放,即使会话状态为"KILLED",依然会阻塞其它会话. 下面根据Eygel的"Oracle中Kill session的研究",构造一个案例看看kill session到底做了什么.如下所示 会话1: SQL> conn

redis transaction和connection命令操作

/*********** redis transaction命令操作 **********/ 1. DISCARD - summary: Discard all commands issued after MULTI since: 2.0.0 EXEC - summary: Execute all commands issued after MULTI since: 1.2.0 MULTI - summary: Mark the start of a transaction block sinc

Oracle的v$transaction性能视图

1.表结构 SQL> desc v$transaction; 名称                                      是否为空? 类型 ----------------------------------------- -------- ---------------------------- ADDR                                               RAW(8) XIDUSN                          

warning The transaction log file is corrupted.

Remark Even if appealing using compress option has a constraint when preparing the backup, as clearly stated by Percona: Before you can prepare the backup you'll need to uncompress all the files with qpress. The error message you get is : xtrabackup:

SIP协议错误 : 481 Call Leg/Transaction Does Not Exist

问题描述 SIP协议错误 : 481 Call Leg/Transaction Does Not Exist 利用Exosip进行SIP协议通信,对方发送INFO过来,但是我这里一直回复481 Call Leg/Transaction Does Not Exist,请问下大神们产生这个问题可能原因?? 下面是发送的报文信息:INFO sip:153122387331646674@52.50.64.55:5090 SIP/2.0Via: SIP/2.0/UDP 52.160.6.60:5061;r

v$transaction

v$transaction的used_ublk可以查看进度used_ublk 在做回滚时有多少块在使用used_now 现在有多少块在使用used_later 在60秒后有多少块使用(used_later /used_ublk - used_later ) = ???多少时间rollback

A problem when connect MSSQL with transaction.

Problem: Could not load object: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode. =============================================== Solve: If you pass "SelectMethod=cursor" attribute in co

在Web Service中实现Transaction

web 在Web Service中实现Transaction.Net Framework为类,WebForm和WebService提供了事务处理功能.在传统的windows应用程序中,要写一个有事务处理功能的组件不仅要写代码而且要在组件服务中创建一个事务包.这就意味着在任何一台要处理这个事务的机器上,你都不得不打开mmc在COM+应用程序节点下创建一个新包..NET Framework使得这一切变得很简单,事实上我们不用在组件服务中作任何事,这一切都是自动完成的.对WebService来说,.N