Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

sql target in ANT

 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to run hypersonic database update via ant. My build.xml snippet looks as below

my some_script.sql has "shutdown" as the last command. It works fine if I don't have the "shutdown" command in my script file. If I have it, build throws "java.sql.Exception The database shutdown in statement[commit]"
Any ideas?
 
Sheriff
Posts: 3036
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not very familiar with the SQL shutdown statement, but it seems clear what is happening. By shutting down the database you invalidate the JDBC connection. (You understand the Ant task is implemented by JDBC, right?) The connection naturally complains about that. However, as long as shutdown is the last statment, I think you can safely ignore that message.
However, I'm not sure how to make Ant ignore it. You could try setting oneror=continue in the sql task, and see if that helps. (I had to spell error wrong for this post to work.)
 
Sri Rangan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried and it does not help. I am issuing the shutdown as the last command on my sript file and it is the last target in my build file.
But it would be nice to avoid the error message on the console. Though shutdown is completed, build process says "FAILED"
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic