Hi,
I've the same issue.
I try to migrate a web application based to wicket with guice 1.0 to 2.0. I've no problem with guice 1.0, but the same error that you with guice 2.0.
To bypass the problem I use :
public class ModuleConf extends AbstractModule {
@Override
protected void configure() {
/*
* Configuration pour la gestion des resources externes
*/
bind(DataSource.class).toProvider(fromJndi(DataSource.class, "myDatasource"));
/*
* Configuration de Tallystick
*/
}
@Provides
public Context initContext() {
try {
return new InitialContext();
} catch (NamingException e) {
throw new RuntimeException("Unable to initialize context.",e);
}
}
}