Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.0.4
-
Fix Version/s: None
-
Component/s: Services
-
Labels:None
-
Environment:I don't think this is env specific, but I am able to reproduce it on Windows XP
Description
I found this thread - http://www.nabble.com/InitializingBean---afterPropertiesSet---No-such-property:-log-for-class-td20840325.html - after getting the error below. I didn't find a bug for it, so I thought I would create one. Sorry if it's a duplicate.
2009-01-29 11:00:52.651::WARN: Nested in org.springframework.beans.factory.Bean
CreationException: Error creating bean with name 'logErrorService': Cannot creat
e inner bean '(inner bean)' while setting bean property 'target'; nested excepti
on is org.springframework.beans.factory.BeanCreationException: Error creating be
an with name '(inner bean)': Invocation of init method failed; nested exception
is groovy.lang.MissingPropertyException: No such property: log for class: LogErr
orService:
groovy.lang.MissingPropertyException: No such property: log for class: LogErrorS
ervice
at LogErrorService.getProperty(LogErrorService.groovy)
at LogErrorService.afterPropertiesSet(LogErrorService.groovy:8)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivileged(Native Method)
at RunApp_groovy$_run_closure2_closure7.doCall(RunApp_groovy:67)
at RunApp_groovy$_run_closure2_closure7.doCall(RunApp_groovy)
at Init_groovy$_run_closure6.doCall(Init_groovy:131)
at RunApp_groovy$_run_closure2.doCall(RunApp_groovy:66)
at RunApp_groovy$_run_closure2.doCall(RunApp_groovy)
at RunApp_groovy$_run_closure1.doCall(RunApp_groovy:57)
at RunApp_groovy$_run_closure1.doCall(RunApp_groovy)
at gant.Gant.dispatch(Gant.groovy:271)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.processTargets(Gant.groovy:436)
at gant.Gant.processArgs(Gant.groovy:372)
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
The log property is injected via the MetaClass after the Spring context initialization happens, so this won't work. But rather than using InitializingBean, you can create an init() method (call it whatever you want) and call it in BootStrap:
class BootStrap { def logErrorService def init = { servletContext -> logErrorService.init() } }