Hi all, I'm a Grails newbie and have been away from Java for a couple of years and am running into an issue that's driving me crazy.
I have the latest STS 2.5.0 M3 and Grails 1.3.4.
I have been following a tutorial at http://blog.springsource.com/2010/08...y-with-grails/ to play around with Spring Security and I get to the portion where I setup my Bootstrap.groovy to create a couple of Roles and a User and get the following error on the SpringSecurityService object:
Even if I import grails.plugins.springsecurity.SpringSecurityServic e into the file I get the same error.Code:2010-09-03 09:31:11,013 [main] ERROR context.GrailsContextLoader – Error executing bootstraps: No such property: springSecurityService for class: BootStrap groovy.lang.MissingPropertyException: No such property: springSecurityService for class: BootStrap at BootStrap$_closure1.doCall(BootStrap.groovy:18) at grails.util.Environment.evaluateEnvironmentSpecificBlock(Environment.java:251) at grails.util.Environment.executeForEnvironment(Environment.java:244) at grails.util.Environment.executeForCurrentEnvironment(Environment.java:220) at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:164) at grails.web.container.EmbeddableServer$start.call(Unknown Source) at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158) at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy) at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280) at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy) at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149) at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy) at _GrailsRun_groovy.runInline(_GrailsRun_groovy:116) at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy) at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59) at RunApp$_run_closure1.doCall(RunApp.groovy:33) at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) at gant.Gant.withBuildListeners(Gant.groovy:427) at gant.Gant.this$2$withBuildListeners(Gant.groovy) at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) at gant.Gant.dispatch(Gant.groovy:415) at gant.Gant.this$2$dispatch(Gant.groovy) at gant.Gant.invokeMethod(Gant.groovy) at gant.Gant.executeTargets(Gant.groovy:590) at gant.Gant.executeTargets(Gant.groovy:589)
As if this wasn't bad enough, I ran grails clean via STS and now all of my domain objects are marked as unresolvable in Bootstrap.groovy and if I modify any other classes and save, their imports show as unresolvable too. If I do a grails run-app those errors don't seem to bother anything (just my original SpringSecurityService issue).
What gives? Why is STS deciding that everything is unresolvable? Why does SpringSecurityService unrecognized?
I created the app, ran 'install-plugin spring-security-core', ran 's2-quickstart edu.conncoll.tests User Role', ran 'create-controller edu.conncoll.tests.Secure' and added a few entries to that file along with their @Secured annotations, and then setup the Bootstrap.groovy exactly as mentioned in the tutorial.
Thanks for any advice/help!


Reply With Quote