NutzCN Logo
问答 update 执行的时候怎么会有锁呢 ?
发布于 2736天前 作者 Rekoe 1664 次浏览 复制 上一个帖子 下一个帖子
标签:

执行update 操作

dao.update(WxUser.class, Chain.make("name", bind.getName()).add("user_group", bind.getOffice()).add("addr", bind.getAddr()).add("is_valid", true).add("msl", bind.isMsl()), Cnd.where("id", "=", wxUser.getId()));
				

结果有lock超时提醒 为什么?

[DEBUG] - org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) - UPDATE wx_user SET name=?,user_group=?,addr=?,is_valid=?,msl=?  WHERE id=?
    |   1 | 2 | 3 |    4 |     5 | 6 |
    |-----|---|---|------|-------|---|
    | 张嘉乐 | 1 | 1 | true | false | 8 |
  For example:> "UPDATE wx_user SET name='张嘉乐',user_group=1,addr=1,is_valid=true,msl=false  WHERE id=8"
[04:28:17:291] [DEBUG] - org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:97) - SQLException
com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_112]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_112]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_112]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_112]
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) ~[mysql-connector-java-5.1.40.jar:5.1.40]
	at com.mysql.jdbc.Util.getInstance(Util.java:408) ~[mysql-connector-java-5.1.40.jar:5.1.40]
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:951) ~[mysql-connector-java-5.1.40.jar:5.1.40]
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3970) ~[mysql-connector-java-5.1.40.jar:5.1.40]
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3906) ~[mysql-connector-java-5.1.40.jar:5.1.40]
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524) ~[mysql-connector-java-5.1.40.jar:5.1.40]
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677) ~[mysql-connector-java-5.1.40.jar:5.1.40]
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2549) ~[mysql-connector-java-5.1.40.jar:5.1.40]
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861) ~[mysql-connector-java-5.1.40.jar:5.1.40]
	at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1192) ~[mysql-connector-java-5.1.40.jar:5.1.40]
	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:2931) ~[druid-1.0.29.jar:1.0.29]
	at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440) ~[druid-1.0.29.jar:1.0.29]
	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:2929) ~[druid-1.0.29.jar:1.0.29]
	at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:131) ~[druid-1.0.29.jar:1.0.29]
	at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:493) ~[druid-1.0.29.jar:1.0.29]
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runPreparedStatement(NutDaoExecutor.java:308) ~[nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:90) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:66) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.plugins.cache.dao.DaoCacheInterceptor._exec(DaoCacheInterceptor.java:28) [nutz-plugins-daocache-1.r.62-20170523.122604-29.jar:?]
	at org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:187) [nutz-plugins-daocache-1.r.62-20170523.122604-29.jar:?]
	at org.nutz.plugins.cache.dao.DaoCacheInterceptor.filter(DaoCacheInterceptor.java:18) [nutz-plugins-daocache-1.r.62-20170523.122604-29.jar:?]
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:158) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:125) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:92) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:81) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:245) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:257) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.dao.impl.EntityOperator.exec(EntityOperator.java:55) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.dao.impl.NutDao.update(NutDao.java:342) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at com.mysada.module.DingCanModule.cn(DingCanModule.java:122) [om_wx_rest.jar:?]
	at com.mysada.module.DingCanModule$FM$cn$3cae9b4c3864d599643cdeda3fef2539.invoke(DingCanModule.java) [nutz-1.r.62-20170523.052206-29.jar:?]
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.integration.shiro.NutShiroProcessor.process(NutShiroProcessor.java:126) [nutz-integration-shiro-1.r.62-20170524.052616-30.jar:?]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202) [nutz-1.r.62-20170523.052206-29.jar:1.r.62-SNAPSHOT]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.15]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.15]
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) [shiro-web-1.3.2.jar:1.3.2]
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) [shiro-web-1.3.2.jar:1.3.2]
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.3.2.jar:1.3.2]
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.3.2.jar:1.3.2]
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) [shiro-core-1.3.2.jar:1.3.2]
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) [shiro-web-1.3.2.jar:1.3.2]
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.3.2.jar:1.3.2]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.15]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.15]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [catalina.jar:8.5.15]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:8.5.15]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [catalina.jar:8.5.15]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:8.5.15]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [catalina.jar:8.5.15]
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) [catalina.jar:8.5.15]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:8.5.15]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [catalina.jar:8.5.15]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-coyote.jar:8.5.15]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:8.5.15]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) [tomcat-coyote.jar:8.5.15]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-coyote.jar:8.5.15]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.15]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_112]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_112]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.15]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]
4 回复

有其他正在执行的update/insert/delete语句?

没有吧
每次执行到这 都会有这个异常

在这个SQL之前的代码执行了啥??? 日志贴一下

@wendal 没事了 是磁盘空间满了

添加回复
请先登陆
回到顶部