This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

batchUpdate problem

 
shilpa vijay
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to update 100 records in a table ,I am using batchUpdate but it is giving following error
Lock wait timeout exceeded; try restarting transaction
at com.mysql.jdbc.StatementImpl.executeBatch(StatementImpl.java:1008)
at Task.Sample.updateUrl(Sample.java:115)
at Task.Sample.fetchHundredRecordFromURLS(Sample.java:50)
at Task.Sample.fetchHundredRecordFromURLS(Sample.java:58)
at Task.Sample.main(Sample.java:138)

how to overcome this.
I am using mysql
 
Rahul P Kumar
Ranch Hand
Posts: 188
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this link
 
shilpa vijay
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved the problem.
As I was trying to update 100 records at a time...it is updating successfully
close connection wherver required,make sure that while updating records there shd be only one active connection .
If if more than active conjection ,then this type of error will occur.

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic