• Register
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 5 3
6,930 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 :


9 7 4
38,600 points

Related questions

1 vote
1 answer 22 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
1 answer 23 views
Problem: I am working on Hibernate and now I am facing what I believe is a simple problem with the Hibernate but still I can't solve it. I have written a simple class I would like to persist but still keep facing below error: SEVERE: Field 'id' doesn't have a ... that is not working for me. Initializing the id also did not help me either! I am looking for Hibernate expert to fix my above error.
asked Jul 30 Raphael Pacheco 4.9k points
0 votes
1 answer 16 views
0 votes
2 answers 65 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