Closed ldeck closed 1 year ago
If you are able to submit a pull request I'll push out a new release for it.
I've created pull request that fix this problem https://github.com/gpc/grails-greenmail/pull/10
Hi all.
I have a problem when the method stop() is called from an integration test in a Grails 3.1.4 application. The error said: "No such property services".
Anyone has the same problem? Is related to this?
Thank you!
this problem is still present:
WARN 6112 --- [ Thread-8] o.s.b.f.support.DisposableBeanAdapter : Invocation of destroy method 'stop' failed on bean with name 'greenMail'
groovy.lang.MissingPropertyException: No such property: services for class: grails.plugin.greenmail.GreenMail
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:66)
at org.codehaus.groovy.runtime.callsite.GetEffectivePogoPropertySite.getProperty(GetEffectivePogoPropertySite.java:87)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:310)
at grails.plugin.greenmail.GreenMail.stop(GreenMail.groovy:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
services
is private and has no accessible getterservices
is a Map
but the way the plugin iterates over it looks like iteration over a Collection
ref:
This issue looks like it is stale and therefor it is in risk of being closed with no further action.
grails.plugin.greenmail.GreenMail is not in the same package as com.icegreen.greenmail.util.GreenMail.. thus stop() fails to find the super's services field at runtime as (being a Java class) it has package protection on the field.
It should call super akin to the start() method.