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
  • 37,241
  • 25
  • 195
  • 267
Victor
  • 8,309
  • 14
  • 80
  • 129
  • 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,988
  • 3
  • 33
  • 49