• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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: 3063
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"
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic