0

I getting the exception MySQLTransactionRollbackException (error 1213) when I try to do a select query.

The exception has the following message:

"Deadlock found when trying to get lock; try restarting transaction"

How can I restart transaction in Java?

Cœur
  • 34,719
  • 24
  • 185
  • 251
Victor
  • 7,964
  • 14
  • 77
  • 126
  • Possible duplicate: http://stackoverflow.com/questions/2332768/how-to-avoid-mysql-deadlock-found-when-trying-to-get-lock-try-restarting-transa – mindas Mar 18 '11 at 21:58

1 Answers1

0

Looks like you are using innoDB and you are having issues with row level locking.

look here: http://dev.mysql.com/doc/refman/5.1/de/innodb-lock-modes.html

Jakob Alexander Eichler
  • 2,888
  • 3
  • 31
  • 47