File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes error in database Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "error in database" Watch "error in database" New topic
Author

error in database

Nimish Patel
Ranch Hand

Joined: Jun 29, 2005
Posts: 84
hi,

i use mysql database.

i get some error like...

java.sql.SQLException: Deadlock found when trying to get lock; Try restarting transaction message from server: "Lock wait timeout exceeded; try restarting transaction".

my application first is login process( related to login tabel in mysql).
it do successfully

second is adddata.it is also completed. (it is related subscriber table in mysql). add data in table using "insert query".

but third process is connected with anothe table.
when i try to insert record in this table i get error.in this insert process , i use primary key of above table.

and i get exception given above.

please help me .

thanks in advance.
Nimish
Dave Salter
Ranch Hand

Joined: Jul 20, 2005
Posts: 292

Can you show us the SQL that is being executed in the transaction?

Are there multiple transactions being performed at this time?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: error in database
 
Similar Threads
batchUpdate problem
Problem with transaction.timeout
Transaction or Table Locking?
jsp and mysql error
Trouble with Spring @Transactional and dead locks