当前位置:编程学习 > JAVA >>

org.springframework.dao.CannotAcquireLockException


org.springframework.dao.CannotAcquireLockException: SqlMapClient operation; SQL [];   
--- The error occurred in jp/ne/colins/sql/cn13Sql.xml.  
--- The error occurred while applying a parameter map.  
--- Check the insertWExAisVslInfo-InlineParameterMap.  
--- Check the statement (update failed).  
--- Cause: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in jp/ne/colins/sql/cn13Sql.xml.  
--- The error occurred while applying a parameter map.  
--- Check the insertWExAisVslInfo-InlineParameterMap.  
--- Check the statement (update failed).  
--- Cause: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:261)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:203)
at org.springframework.orm.ibatis.SqlMapClientTemplate.update(SqlMapClientTemplate.java:378)
at jp.ne.colins.dao.impl.UpdateDAOiBatisImpl.execute(UpdateDAOiBatisImpl.java:36)
at jp.ne.colins.service.impl.CN13ServiceImpl.updateAISShipInfo(CN13ServiceImpl.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy1.updateAISShipInfo(Unknown Source)
at jp.ne.colins.CN13001.updateShipInfo(CN13001.java:255)
at jp.ne.colins.CN13001.execute(CN13001.java:93)
at jp.ne.colins.CN13001.main(CN13001.java:62)
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in jp/ne/colins/sql/cn13Sql.xml.  
--- The error occurred while applying a parameter map.  
--- Check the insertWExAisVslInfo-InlineParameterMap.  
--- Check the statement (update failed).  
--- Cause: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:457)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.update(SqlMapSessionImpl.java:90)
at org.springframework.orm.ibatis.SqlMapClientTemplate$9.doInSqlMapClient(SqlMapClientTemplate.java:380)
at org.springframework.orm.ibatis.SqlMapClientTemplate$9.doInSqlMapClient(SqlMapClientTemplate.java:1)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:200)
... 21 more
Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2934)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3255)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1293)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:867)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:80)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteUpdate(MappedStatement.java:216)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)
... 26 more


这是什么错误呀   
同样的执行另一个表是 可以通过的  事务我也配置了  是表被锁住了的原因吗   请高手解答 !!!! --------------------编程问答-------------------- 同一个事务同时对同一个表有修改。 --------------------编程问答-------------------- 同一个事务有两个处理,同时对同一个表或同一条数据有修改。
前一个处理事务没提交,新的再来处理,所以报这个错。
补充:Java ,  Java相关
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,