java - mybatis execute an update SQL,and then throw Exception of Deadlock -


this update used here, , exception not happen, don't know how registration problem

sql: update sys_privilege set    privilege_code = ?,    type = ?,    level = ?,    name = ?,    parent_id = ?,    sort_num  = ?   id = ? 
cause: com.mysql.jdbc.exceptions.jdbc4.mysqltransactionrollbackexception: deadlock found when trying lock; try restarting transaction ; sql []; deadlock found when trying lock; try restarting transaction; nested exception com.mysql.jdbc.exceptions.jdbc4.mysqltransactionrollbackexception: deadlock found when trying lock; try restarting transaction     @ org.springframework.jdbc.support.sqlerrorcodesqlexceptiontranslator.dotranslate(sqlerrorcodesqlexceptiontranslator.java:269)     @ org.springframework.jdbc.support.abstractfallbacksqlexceptiontranslator.translate(abstractfallbacksqlexceptiontranslator.java:72)     @ org.mybatis.spring.mybatisexceptiontranslator.translateexceptionifpossible(mybatisexceptiontranslator.java:73)     @ org.mybatis.spring.sqlsessiontemplate$sqlsessioninterceptor.invoke(sqlsessiontemplate.java:371)     @ com.sun.proxy.$proxy4.update(unknown source)     @ 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.$proxy45.updatesysprivilegebyid(unknown source)     @ com.zhicloud.op.service.impl.privilegeserviceimpl$loadprivilegeconfigtask.handleprivilegeelement(privilegeserviceimpl.java:151)     @ com.zhicloud.op.service.impl.privilegeserviceimpl$loadprivilegeconfigtask.load(privilegeserviceimpl.java:81)     @ com.zhicloud.op.service.impl.privilegeserviceimpl.load(privilegeserviceimpl.java:45)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)     @ java.lang.reflect.method.invoke(method.java:483)     @ org.springframework.aop.support.aoputils.invokejoinpointusingreflection(aoputils.java:317)     @ org.springframework.aop.framework.reflectivemethodinvocation.invokejoinpoint(reflectivemethodinvocation.java:183)     @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:150)     @ org.springframework.transaction.interceptor.transactioninterceptor$1.proceedwithinvocation(transactioninterceptor.java:96)     @ org.springframework.transaction.interceptor.transactionaspectsupport.invokewithintransaction(transactionaspectsupport.java:260)     @ org.springframework.transaction.interceptor.transactioninterceptor.invoke(transactioninterceptor.java:94)     @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:172)     @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:204)     @ com.sun.proxy.$proxy8.load(unknown source)     @ com.zhicloud.op.app.authorization.privilegeinitializelistener.contextinitialized(privilegeinitializelistener.java:24)     @ org.apache.catalina.core.standardcontext.listenerstart(standardcontext.java:4939)     @ org.apache.catalina.core.standardcontext.startinternal(standardcontext.java:5434)     @ org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:150)     @ org.apache.catalina.core.containerbase$startchild.call(containerbase.java:1559)     @ org.apache.catalina.core.containerbase$startchild.call(containerbase.java:1549)     @ java.util.concurrent.futuretask.run(futuretask.java:266)     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617)     @ java.lang.thread.run(thread.java:745) caused by: com.mysql.jdbc.exceptions.jdbc4.mysqltransactionrollbackexception: deadlock found when trying lock; try restarting transaction     @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method)     @ sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:62)     @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:45)     @ java.lang.reflect.constructor.newinstance(constructor.java:408)     @ com.mysql.jdbc.util.handlenewinstance(util.java:409)     @ com.mysql.jdbc.util.getinstance(util.java:384)     @ com.mysql.jdbc.sqlerror.createsqlexception(sqlerror.java:1064)     @ com.mysql.jdbc.mysqlio.checkerrorpacket(mysqlio.java:4232)     @ com.mysql.jdbc.mysqlio.checkerrorpacket(mysqlio.java:4164)     @ com.mysql.jdbc.mysqlio.sendcommand(mysqlio.java:2615)     @ com.mysql.jdbc.mysqlio.sqlquerydirect(mysqlio.java:2776)     @ com.mysql.jdbc.connectionimpl.execsql(connectionimpl.java:2838)     @ com.mysql.jdbc.preparedstatement.executeinternal(preparedstatement.java:2082)     @ com.mysql.jdbc.preparedstatement.execute(preparedstatement.java:1307)     @ org.apache.commons.dbcp.delegatingpreparedstatement.execute(delegatingpreparedstatement.java:172)     @ org.apache.commons.dbcp.delegatingpreparedstatement.execute(delegatingpreparedstatement.java:172)     @ org.apache.ibatis.executor.statement.preparedstatementhandler.update(preparedstatementhandler.java:44)     @ org.apache.ibatis.executor.statement.routingstatementhandler.update(routingstatementhandler.java:69)     @ org.apache.ibatis.executor.simpleexecutor.doupdate(simpleexecutor.java:48)     @ org.apache.ibatis.executor.baseexecutor.update(baseexecutor.java:105)     @ org.apache.ibatis.executor.cachingexecutor.update(cachingexecutor.java:71)     @ org.apache.ibatis.session.defaults.defaultsqlsession.update(defaultsqlsession.java:152)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)     @ java.lang.reflect.method.invoke(method.java:483)     @ org.mybatis.spring.sqlsessiontemplate$sqlsessioninterceptor.invoke(sqlsessiontemplate.java:358)     ... 31 more 


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -