I have been trying to use Google Guice in eclipse plug-in development. I have imported Guice jar as another plug-in project. But somehow Guice is unable to inject dependency.
Any ideas???
This is the error message
com.google.inject.ConfigurationException: Guice configuration errors:
1) No implementation for java.util.List<java.lang.String> was bound.
while locating java.util.List<java.lang.String>
for parameter 1 at com.checker.extension.provider.util.PluginUtils.<init>(Unknown Source)
while locating com.checker.extension.provider.util.PluginUtils
1 error
EDIT1
One thing which I would like to mention is the configuration works correctly when I use normal Java application but it don't when I use plug-in project
EDIT2 Below is the code which I am using
@Override
protected void configure() {
bind(List.class).toInstance(DIObjects.buildFolderNames);
}
Here DIObjects.buildFolderNames
is the static field which I need to inject.
Defination of DIObjects.buildFolderNames is as follows.
public static List<String> buildFolderNames;
and I have initialized this field.
Is the problem is because of different classloaders of eclipse and Guice ???