You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Geronimo User <ge...@gmail.com> on 2007/02/09 03:09:30 UTC
Can't addReference() to MailGBean because no no-arg constructor?
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/dev@geronimo.apache.org/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.