Dec 4th, 2009, 02:00 PM
groovy.lang.MissingMethodException when starting maven managed grails application
I am getting the following exception when running my maven managed grails application via STS nightly (from today). Anyone else see this or know what might cause it?
Running script /Users/ryan/Apps/grails-1.1.1/scripts/RunApp.groovy
Environment set to development
groovy.lang.MissingMethodException: No signature of method: groovy.util.ConfigSlurper.parse() is applicable for argument types: (Config) values: [Config@33abb81e]
at _GrailsPackage_groovy$_run_closure1.doCall(_Grails Package_groovy:45)
at _GrailsPackage_groovy$_run_closure2_closure10.doCa ll(_GrailsPackage_groovy:87)
at _GrailsPackage_groovy$_run_closure2_closure10.doCa ll(_GrailsPackage_groovy)
at _GrailsSettings_groovy$_run_closure10.doCall(_Grai lsSettings_groovy:274)
at _GrailsSettings_groovy$_run_closure10.call(_Grails Settings_groovy)
at _GrailsPackage_groovy$_run_closure2.doCall(_Grails Package_groovy:86)
at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:32 4)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:33 4)
at gant.Gant$this$2$withBuildListeners.callCurrent(Un known Source)
Failed to compile configuration file: No signature of method: groovy.util.ConfigSlurper.parse() is applicable for argument types: (Config) values: [Config@33abb81e]
Jan 21st, 2010, 08:23 PM
I am still getting this error however I am now running Grails 1.2.0 and STS nightly from last week. Any ideas?
Jan 21st, 2010, 08:50 PM
Turns out this was being caused by eclipse generating class files to the same location the grails tomcat server was running from. I changed my projects output directory to something other than "target/classes" (I used "target/classes-eclipse") and I was able to run the application.
The also "fixed" auto-reloading/hot deploy of edited files. Before I changed this setting many times the running grails web server would not pick up the changes unless the change was a controller. Now it appear to be working much more smoothly.
Jan 21st, 2010, 10:21 PM
Sorry, one more update. =)
While changing the output directory allowed me to run grails from Eclipse->Debug and debug the application I am not able to consistently hot deploy any code changes. The first deploy usually works just fine. I save my change to a .groovy file, I see that the running server picks up the change, compiles the file, and restarts the server... but then the editors I have open in Eclipse show a bunch of errors about not being able to resolve classes. Sounds like there is some sort of conflict between the two.
Is this area of STS going to be worked on any time in the future? Being able to reliably debug and make changes on the fly is a huge productivity booster.