2009/10/15 oakridge <[email protected]> > > Hi all, > > I am trying to upgrade to Guice 2.0, but keep getting the following > error: > > Guice provision errors:1) Error in custom provider, > com.google.inject.internal.ComputationException: > com.google.inject.internal.ComputationException: > com.google.inject.internal.cglib.core.CodeGenerationException: > java.lang.reflect.InvocationTargetException-->null .... > > I am unclear as to why this is occurring. I am trying to wrap a > module used elsewhere in my code (rootModule), but only expose certain > classes. After some research, I was found this issue, but am unsure > if it is related: > > http://code.google.com/p/google-guice/issues/detail?id=343 >
one way to find out would be to try this patched jar: http://peaberry.googlecode.com/svn/tags/1.1.1/lib/build/guice-customloader-20090412.jar which is Guice 2.0 plus the suggested patch for 343 > My code looks like this where the error occurs: > > public class WrapperModule extends AbstractModule { > > protected void configure() { > > final AbstractModule rootModule = > new RootModule(); > > //error occurs after this line > bind(iRobot.class).toProvider(new Provider<iRobot>() { > public iRobot get() { > return Guice.createInjector( rootModule).getInstance > (Robot.class); > } > }).in(Scopes.SINGLETON); > > .... > > > -- Cheers, Stuart --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-guice?hl=en -~----------~----~----~----~------~----~------~--~---
