Hi,
I am using Guice with my GWT web project successfully, after I installed it as explained here:
https://github.com/google/guice/wiki/ServletsI 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...