MyBatis:处理事务时我很困惑,我的框架是SSM(SpringMVC,Spring,MyBatis)

时间:2018-03-14 11:49:18

标签: java database mybatis

线程“Thread-93”中的异常org.springframework.dao.DeadlockLoserDataAccessException:

更新数据库时出错。原因:com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException:尝试获取锁定时发现死锁;尝试重新启动事务

该错误可能涉及defaultParameterMap

设置参数

时发生错误

SQL:更新user_info_star设置uid =? ,英雄=? ,设备=? ,国=?队长=? ,营=?其中uid =?;

原因:com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException:尝试获取锁定时发现死锁;尝试重新启动事务

SQL [];试图锁定时发现死锁;尝试重启交易;嵌套异常是com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException:尝试获取锁定时发现死锁;尝试重新启动事务     在org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:263)     在org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)     at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)     在org.mybatis.spring.SqlSessionTemplate $ SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371)     在com.sun.proxy。$ Proxy18.update(未知来源)     在org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:254)     在org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:54)     在org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)     在com.sun.proxy。$ Proxy23.updateUserStar(未知来源)     在com.qile.game.tf.service.UserInfoService.updateUserStar(UserInfoService.java:459)     在com.qile.game.tf.service.UserInfoService $$ FastClassBySpringCGLIB $$ 4c2e17f3.invoke()     在org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)     在org.springframework.aop.framework.CglibAopProxy $ CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)     在org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)     at org.springframework.transaction.interceptor.TransactionInterceptor $ 1.proceedWithInvocation(TransactionInterceptor.java:99)     at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)     at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)     在org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)     在org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)     在org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)     在org.springframework.aop.framework.CglibAopProxy $ DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)     在com.qile.game.tf.service.UserInfoService $$ EnhancerBySpringCGLIB $$ e3dc2ca3_2.updateUserStar()     在com.qile.game.tf.manager.UserStarUpgradeManager.doCalcHeroStar(UserStarUpgradeManager.java:112)     在com.qile.game.tf.manager.UserStarUpgradeManager.access $ 000(UserStarUpgradeManager.java:15)     在com.qile.game.tf.manager.UserStarUpgradeManager $ 1.run(UserStarUpgradeManager.java:49)     在java.lang.Thread.run(Thread.java:745)

我不知道如何处理这个问题,有人可以帮助我吗?

0 个答案:

没有答案