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

Hibernate JIRA | Zbyněk Roubalík | 5 years ago
  1. 0

    this test fails because of: RollbackException: Transaction marked as rollbackOnly https://hudson.qa.jboss.com/hudson/job/hibernate-core-master-matrix-mysql72/40/database=mysql-cluster-72-singlenode,jdk=java16_default,label=hibernate/testReport/org.hibernate.ejb.test.lock/LockTest/testContendedPessimisticLock/ 16:24:11,047 DEBUG SqlExceptionHelper:139 - Lock wait timeout exceeded; try restarting transaction [n/a] java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597) at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:1570) at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1426) at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2913) at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:477) at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2619) at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1788) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2209) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2281) at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122) at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81) at $Proxy45.executeQuery(Unknown Source) at org.hibernate.loader.Loader.getResultSet(Loader.java:1962) at org.hibernate.loader.Loader.doQuery(Loader.java:829) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289) at org.hibernate.loader.Loader.doList(Loader.java:2447) at org.hibernate.loader.Loader.doList(Loader.java:2433) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2263) at org.hibernate.loader.Loader.list(Loader.java:2258) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:470) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:355) at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:196) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1161) at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101) at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:252) at org.hibernate.ejb.test.lock.LockTest$1.call(LockTest.java:353) at org.hibernate.ejb.test.lock.LockTest$1.call(LockTest.java:341) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.lang.Thread.run(Thread.java:662)

    Hibernate JIRA | 5 years ago | Zbyněk Roubalík
    java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
  2. 0

    this test fails because of: RollbackException: Transaction marked as rollbackOnly https://hudson.qa.jboss.com/hudson/job/hibernate-core-master-matrix-mysql72/40/database=mysql-cluster-72-singlenode,jdk=java16_default,label=hibernate/testReport/org.hibernate.ejb.test.lock/LockTest/testContendedPessimisticLock/ 16:24:11,047 DEBUG SqlExceptionHelper:139 - Lock wait timeout exceeded; try restarting transaction [n/a] java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597) at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:1570) at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1426) at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2913) at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:477) at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2619) at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1788) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2209) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2281) at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122) at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81) at $Proxy45.executeQuery(Unknown Source) at org.hibernate.loader.Loader.getResultSet(Loader.java:1962) at org.hibernate.loader.Loader.doQuery(Loader.java:829) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289) at org.hibernate.loader.Loader.doList(Loader.java:2447) at org.hibernate.loader.Loader.doList(Loader.java:2433) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2263) at org.hibernate.loader.Loader.list(Loader.java:2258) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:470) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:355) at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:196) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1161) at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101) at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:252) at org.hibernate.ejb.test.lock.LockTest$1.call(LockTest.java:353) at org.hibernate.ejb.test.lock.LockTest$1.call(LockTest.java:341) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.lang.Thread.run(Thread.java:662)

    Hibernate JIRA | 5 years ago | Zbyněk Roubalík
    java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Troubleshooting consistent "SQLException: Lock wait timeout exceeded"

    Stack Overflow | 8 years ago | rcampbell
    org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Lock wait timeout exceeded; try restarting transaction [See nested exception: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction]

  1. Kialandei 1 times, last 1 week ago
  2. poroszd 1 times, last 1 year ago
11 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.sql.SQLException

    Lock wait timeout exceeded; try restarting transaction

    at com.mysql.jdbc.SQLError.createSQLException()
  2. MySQL jdbc
    PreparedStatement.executeQuery
    1. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
    2. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
    3. com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:1570)
    4. com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1426)
    5. com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2913)
    6. com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:477)
    7. com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2619)
    8. com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1788)
    9. com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2209)
    10. com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)
    11. com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
    12. com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2281)
    12 frames
  3. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    3. java.lang.reflect.Method.invoke(Method.java:597)
    3 frames
  4. org.hibernate.engine
    AbstractProxyHandler.invoke
    1. org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)
    2. org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
    2 frames
  5. Unknown
    $Proxy45.executeQuery
    1. $Proxy45.executeQuery(Unknown Source)
    1 frame
  6. Hibernate
    QueryImpl.list
    1. org.hibernate.loader.Loader.getResultSet(Loader.java:1962)
    2. org.hibernate.loader.Loader.doQuery(Loader.java:829)
    3. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289)
    4. org.hibernate.loader.Loader.doList(Loader.java:2447)
    5. org.hibernate.loader.Loader.doList(Loader.java:2433)
    6. org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2263)
    7. org.hibernate.loader.Loader.list(Loader.java:2258)
    8. org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:470)
    9. org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:355)
    10. org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:196)
    11. org.hibernate.internal.SessionImpl.list(SessionImpl.java:1161)
    12. org.hibernate.internal.QueryImpl.list(QueryImpl.java:101)
    12 frames
  7. Hibernate EJB
    QueryImpl.getResultList
    1. org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:252)
    1 frame
  8. org.hibernate.ejb
    LockTest$1.call
    1. org.hibernate.ejb.test.lock.LockTest$1.call(LockTest.java:353)
    2. org.hibernate.ejb.test.lock.LockTest$1.call(LockTest.java:341)
    2 frames
  9. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:138)
    3. java.lang.Thread.run(Thread.java:662)
    3 frames