Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.2-RC2
-
Fix Version/s: 1.2 final
-
Component/s: None
-
Labels:None
Description
i get this stacktrace at startup:
2009-12-17 10:48:35,657 [main] ERROR plugins.DefaultGrailsPluginManager - Error configuring dynamic methods for plugin [validation:1.2.0.RC2]: java.lang.IllegalArgumentException: Class must not be null
org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.IllegalArgumentException: Class must not be null
at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:135)
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:287)
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:115)
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_closure4.doCall(Gant.groovy:324)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:344)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:334)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.processTargets(Gant.groovy:495)
at gant.Gant.processTargets(Gant.groovy:480)
Caused by: java.lang.IllegalArgumentException: Class must not be null
... 23 more
i pinned it down to services which define a scope other than singleton. If you put for example
static scope = "flow"
into a service the error occurs. I tested this with prototype, request, flash, flow,
conversation, session and singleton (all values i found at http://www.grails.org/Services ).
Only singleton works without error.
A sample project is attached.
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
This is a downstream bug in Spring (thanks to Jeff for identifying it) see http://jira.springframework.org/browse/SPR-6579
The fix I have gone for is to fork the (now removed from Spring 3.0) GenericBeanFactoryAccessor from Spring 2.5.6 into the Grails code base and use that instead:
http://github.com/grails/grails/commit/84f8edf8dede28cce25f6f4dfa2b74fb53db75ac
This seemed to me to be the lowest risk fix.