java.lang.IllegalArgumentException: Unable to inject an instance of com.google.gwt.inject.client.multibindings.GinMultibinder$SetModule because it is a private class.

Google Groups | Unknown author | 4 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Issue 184 in google-gin: Unexpected error while using a private inner module: "Unable to inject an instance of XXX because it is a private class."

    Google Groups | 4 years ago | Unknown author
    java.lang.IllegalArgumentException: Unable to inject an instance of com.google.gwt.inject.client.multibindings.GinMultibinder$SetModule because it is a private class.

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Unable to inject an instance of com.google.gwt.inject.client.multibindings.GinMultibinder$SetModule because it is a private class.

      at com.google.gwt.inject.rebind.reflect.ReflectUtil.getClassPackageNames()
    2. GIN (GWT INjection)
      GinjectorGenerator.generate
      1. com.google.gwt.inject.rebind.reflect.ReflectUtil.getClassPackageNames(ReflectUtil.java:237)
      2. com.google.gwt.inject.rebind.reflect.ReflectUtil.getTypePackageNames(ReflectUtil.java:218)
      3. com.google.gwt.inject.rebind.reflect.ReflectUtil.getUserPackageName(ReflectUtil.java:152)
      4. com.google.gwt.inject.rebind.output.GinjectorBindingsOutputter.write(GinjectorBindingsOutputter.java:105)
      5. com.google.gwt.inject.rebind.output.GinjectorImplOutputter.writeInjectorHierarchy(GinjectorImplOutputter.java:128)
      6. com.google.gwt.inject.rebind.output.GinjectorImplOutputter.writeInjectorHierarchy(GinjectorImplOutputter.java:125)
      7. com.google.gwt.inject.rebind.output.GinjectorImplOutputter.write(GinjectorImplOutputter.java:115)
      8. com.google.gwt.inject.rebind.GinjectorGeneratorImpl.generate(GinjectorGeneratorImpl.java:80)
      9. com.google.gwt.inject.rebind.GinjectorGenerator.generate(GinjectorGenerator.java:74)
      9 frames
    3. GWT dev
      GWT.create
      1. com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
      2. com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:657)
      3. com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
      4. com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79)
      5. com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276)
      6. com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:141)
      7. com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:595)
      8. com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:465)
      9. com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
      10. com.google.gwt.core.shared.GWT.create(GWT.java:57)
      11. com.google.gwt.core.client.GWT.create(GWT.java:85)
      11 frames
    4. GIN (GWT INjection)
      __GinMultibinderTest_unitTestImpl.doRunTest
      1. com.google.gwt.inject.client.multibindings.GinMultibinderTest.testInject_sameInterfaceBoundWithBothRegularAndMultiBind(GinMultibinderTest.java:161)
      2. com.google.gwt.inject.client.multibindings.__GinMultibinderTest_unitTestImpl.doRunTest(__GinMultibinderTest_unitTestImpl.java:22)
      2 frames
    5. JUnit
      TestCase.runTest
      1. junit.framework.TestCase.runTest(TestCase.java:62)
      1 frame
    6. Vaadin
      RequestBuilder$1.onReadyStateChange
      1. com.google.gwt.junit.client.GWTTestCase.runBare(GWTTestCase.java:188)
      2. com.google.gwt.junit.client.GWTTestCase.__doRunTest(GWTTestCase.java:129)
      3. com.google.gwt.junit.client.impl.GWTRunner.runTest(GWTRunner.java:390)
      4. com.google.gwt.junit.client.impl.GWTRunner.doRunTest(GWTRunner.java:318)
      5. com.google.gwt.junit.client.impl.GWTRunner.access$9(GWTRunner.java:312)
      6. com.google.gwt.junit.client.impl.GWTRunner$TestBlockListener.onSuccess(GWTRunner.java:107)
      7. com.google.gwt.junit.client.impl.GWTRunner$TestBlockListener.onSuccess(GWTRunner.java:1)
      8. com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232)
      9. com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
      10. com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
      10 frames
    7. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:601)
      3 frames
    8. GWT dev
      Impl.entry0
      1. com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
      2. com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
      3. com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
      4. com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
      5. com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
      6. com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
      7. com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
      8. com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
      9. com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
      10. com.google.gwt.core.client.impl.Impl.apply(Impl.java)
      11. com.google.gwt.core.client.impl.Impl.entry0(Impl.java:249)
      11 frames
    9. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:601)
      3 frames
    10. GWT dev
      BrowserChannelServer.run
      1. com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
      2. com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
      3. com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
      4. com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
      5. com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
      6. com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
      6 frames
    11. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:722)[ERROR]
      1 frame