Be sure that derby.jar is either:
If you are using JDK 1.5 or greater, a LinkageError will occur. Removing the mx4j-3.0.2.jar library from %GROOVY_HOME%\lib will make it work again, but a better solution would be preferable.
Look at http://jira.codehaus.org/browse/GROOVY-2303 for further information, or ask on the user@groovy.codehaus.org.
This will create derby.log and derbyDB folder in the folder where the script is.
If something goes wrong, simply remove derbyDB folder, and everything will be clean for next run.