Hi,
I am using Guice with my GWT web project successfully, after I installed it
as explained here:
https://github.com/google/guice/wiki/Servlets
I can bind servlets, filters, etc.
But when I try to do the easiest injection (construction injection), I get
an exception. What may I be doing wrong?
SchuelerFormDMIHandler:
public class SchuelerFormDMIHandler
private ElternDMI elternDmi;
@Inject
public SchuelerFormDMIHandler(ElternDMI elternDmi) {
this.elternDmi = elternDmi;
}
........
}
I get this exception:
RPCManager:Instantiation of class: SchuelerFormDMIHandler threw an
InstantiationException - most likely cause is the class represents an
abstract class, an interface, an array class, a primitive type, or void; or
the class has no zero-argument constructor.undefined
If I create a zero-argument constructor, the field "elternDmi" would not be
initiated,... so what am I doing wrong?
ElternDMI is a normal class, it is not an interface, so I want to bind it
with itself...
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-guice/d5aa0830-6165-4d87-bf49-6a219a6f8c1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.