Hi:

I'm trying to load a GBean in which I have done this in the static {} section:

                infoFactory.addReference("MyMailGBean", MailGBean.class,
NameFactory.JAVA_MAIL_RESOURCE);

(I have a setter method for the property for the reference.)

When I load the GBean into Geronimo it says:

java.lang.IllegalArgumentException: Cannot find matching method/constructor
        at 
org.apache.geronimo.mail.MailGBean$$EnhancerByCGLIB$$31749e1f$$FastClassByCGLIB$$340be7b9.newInstance(<generated>)
        at net.sf.cglib.reflect.FastClass.newInstance(FastClass.java:91)
        at 
org.apache.geronimo.kernel.basic.BasicProxyManager$ManagedProxyFactory.createProxy(BasicProxyManager.java:213)
        at 
org.apache.geronimo.kernel.basic.BasicProxyManager.createProxy(BasicProxyManager.java:103)
etc. etc.

I found a JIRA issue
http://www.mail-archive.com/[email protected]/msg39406.html
which says
"Specifying a reference to DirectoryGBean.class fails because DirectoryGBean
doesn't have a no-arg constructor."

Neither does MailGBean, if I am correct.

Is the absence of the no-arg constructor the cause of my problem and
how can I work around this.

Thanks.

Reply via email to