Home  >  Forum  >  Hibernate
Post New Query

java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction


joined on
November 02,2014
Asked on February 14,2015
Hi Friends, I am making an application with hibernate and mysql using HeiDiSQL. At some point i started to get exception as below.

Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2141)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2077)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2062)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)
... 14 more
 
joined on
March 14,2013
Replied on February 14,2015

Some thread has locked the resources and another thread is trying to get lock. But lock wait time exceeded. So you got the exception.

1. Kill your java and check again
2. Or restart the server.

Write Answer








Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us