I am using MySQL 5.0.18, with JBoss 4.0.4GA, and Hibernate. We found out that we get the error when we replicate similar actions. Meaning when two users performing similar actions and happen to click on the submit button at the same time and want to create a new record, we get the following error:
10:07:19,269 WARN [JDBCExceptionReporter] SQL Error: 1213, SQLState: 40001 10:07:19,269 ERROR [JDBCExceptionReporter] Deadlock found when trying to get loc k; try restarting transaction 10:13:42,889 WARN [JDBCExceptionReporter] SQL Error: 1205, SQLState: 41000 10:13:42,905 ERROR [JDBCExceptionReporter] Lock wait timeout exceeded; try resta rting transaction
Someone has posted such an error message in the forums, but I could not draw any conclusions from it!