• Post Reply Bookmark Topic Watch Topic
  • New Topic

Run ddl script from file in Groovy  RSS feed

 
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I working with Spock and Groovy in order to test my application. I should need to run a ddl script before to run every test.
To execute the script from Groovy I am using the following code:



The createTable.sql is a complex script that do several drop and create operation ( of course it is multiline ).  When I try to execute it I got the following exception:



To notice that the ddl is correct since that it has been checked running it on the same DB that I am connecting with groovy.

Any Idea how to resolve the problem?



 
author & internet detective
Sheriff
Posts: 37821
582
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd try to rule out the file regardless.

What happens if you just put this in the file?



If it runs without exception, then you know you have to narrow down what part of the file is causing the problem.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!