• Register
0 votes
215 views

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

Please log in or register to answer this question.

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 :

https://github.com/zendesk/maxwell/issues/386

9 7 4
38,600 points

Related questions

1 vote
1 answer 24 views
24 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, 2020 stewart 4k points
0 votes
1 answer 43 views
43 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, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 23 views
0 votes
2 answers 72 views
72 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 359 views
359 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 1.5K views
1.5K 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, 2020 jwilliam 3.9k points
0 votes
1 answer 411 views
411 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
0 votes
2 answers 563 views
563 views
Problem : I am new to the Spring and JPA, wasted 10 days and no result with the searching on internet. I want to save the object to SQL SERVER, my connection is correct but when I write .flush() I get below exception “nested exception is javax.persistence.TransactionRequiredException: no transaction is in progress”
asked Jan 21, 2020 jwilliam 3.9k points
0 votes
1 answer 296 views
296 views
Problem : I am new to Spring and JPA I want to save object to SQL SERVER, connection is correct but when I write .flush() I get the exception as below javax.persistence.TransactionRequiredException: no transaction is in progress
asked Oct 22, 2019 peterlaw 6.9k points