I have just upgraded to...
- Grails 1.4.0.M1
- Groovy 1.8.0
- STS Version: 2.7.0.M2 Build Id: 201106101000 - 64bit Cocoa version for Mac
- I have OS X 10.5.8. with JVM 1.5.0
When I run a grails command eg 'create-app' or 'upgrade' on an existing project I get the following NoClassDefFoundError for the GantBuilder. (see below for full trace)
A proposed solution for a similar problem from this forum is that gant_groovy1.8-1.9.5.jar is missing. I've added this to the project directly and also to a groovy/lib folder (and gone to STS -> preferences -> Groovy -> compiler -> Update All Groovy Classpath Containers) but I still get the error. (When I added gant_groovy1.8-1.9.5.jar to groovy/lib it was to a separate groovy download, I'm not sure which groovy/lib folder STS uses for the internal grails shell commands or how to view the STS groovy class path)
found org.springframework#spring-test;3.1.0.M1 in default
:: resolution report :: resolve 2068ms :: artifacts dl 119ms
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| test | 74 | 0 | 0 | 0 || 74 | 0 |
---------------------------------------------------------------------
Script threw exception
java.lang.NoClassDefFoundError: org.codehaus.gant.GantBuilder
at org.codehaus.gant.GantBinding.class$(GantBinding.groovy)
at org.codehaus.gant.GantBinding.$get$$class$org$codehaus$gant$GantBuilder(GantBinding.groovy)
at org.codehaus.gant.GantBinding.<init>(GantBinding.groovy:41)
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.callPluginOrGrailsScript(GrailsScriptRunner.java:448)
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.runInteractive(GrailsScriptRunner.java:377)
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeCommand(GrailsScriptRunner.java:308)
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.main(GrailsScriptRunner.java:130)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:234)
at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:262)
Does anyone have any ideas?