• Register
Log In
0 votes

Problem :

I am getting bellow error

java.sql.sqlexception lock wait timeout exceeded try restarting transaction

I am using Java Struts 2.1 Hibernate configuration. DB Used is MYSQL.

Anyone know how to solve it..??

6.9k points

1 Answer

0 votes

Solution :

Pleaase make sure the database tables are using InnoDB storage engine and READ-COMMITTED transaction isolation level.

Now you can check it by SELECT @@GLOBAL.tx_isolation, @@tx_isolation; on mysql console.

If it is not set to be READ-COMMITTED then you must set it. You must make sure before setting it that you have SUPER privileges in mysql.

Further Readings :


36.1k points
edited by

Related questions

1 vote
1 answer 11 views
Problem : I am very beginner to MYSQL. Currently I have the innomyDB table which is recording my online users. It will get updated on the every page refresh by the user so that it can keep the track of which the pages they are currently on and then their last access ... is showing if I try to run the INSERT queries into my table. Looking for MYSQL expert who can help me in fixing my above error.
asked May 4 stewart 4k points
0 votes
2 answers 56 views
Problem : I am getting bellow error while trying to execute JDBC code java.sql.sqlexception: operation not allowed after resultset closed
asked Nov 1, 2019 peterlaw 6.9k points
0 votes
1 answer 161 views
Problem : I am updating values using JDBC but getting bellow error java.sql.sqlexception: column count doesn't match value count at row 1
asked Oct 31, 2019 peterlaw 6.9k points
0 votes
1 answer 587 views
Problem : I am using the Hibernate for a first time for my project and I am very new to Hibernate. I think I have followed all the instructions written in some tutorials but still I keep getting the below Exception that is in my title: Exception in thread "main" ... should just change a connection.pool_size property, but if I do so it guesses that I only will get more errors. Can anyone help me?
asked Jan 30 jwilliam 3.9k points
0 votes
1 answer 151 views
Problem : I got following exception from my servlet: java.lang.illegalstateexception: response has already been committed
asked Oct 31, 2019 peterlaw 6.9k points