Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MySQLTimeoutException with iBATIS

 
Anirvan Majumdar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

I'm not too sure whether this post should come in here or the JDBC forum, but since I'm facing this problem while using iBATIS, I thought the O-R mapping forum would be a better bet.

Coming to the problem, I am writing a data layer object on top of MySQL 5 using iBATIS. I keep on running into a MySQLTimeoutException when I try to create a table having an InnoDB engine. Moreover, this is not a consistent problem and its occurrence is quite unpredictable. But it only happens when performing the above mentioned task. Has anyone experienced any such problem before while using iBATIS? Any suggestions would be really appreciated.
 
Anirvan Majumdar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello again,
Since I managed to discover the solution to the problem mentioned above, I thought I might as well share it for some future reference.

To solve the issue of MySQLTimeoutException, I simply added the "timeout" attribute to the <statement> tag I was using to fire the queries in the sqlMap file. It's kind of strange since there's already a "timeout" parameter set in the sqlMapConfig file, which should have done the trick. But well, it doesn't.
And oh yeah, the "timeout" attribute needs to be set a value of "0" [indicating no-timeout].
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic