0 Replies Latest reply on Nov 19, 2014 5:25 AM by Michael Anstis

    IOCGenerator: InjectionFailure: can't resolve bean: Errai 3.0.3.Final

    Michael Anstis Newbie

      Hello,

       

      We have an interface defined here and it's implementation here.

       

      We inject the implementation in a couple of places here (RepositoryStructurePresenter) and here (ProjectScreenPresenter).

       

      If we uncomment the injection in the first link (RepositoryStructurePresenter) we get the following error when compiling drools-wb.

       

      [INFO] --- gwt-maven-plugin:2.5.1:compile (gwt-compile) @ drools-wb-webapp ---

      [INFO] Compiling module org.drools.workbench.FastCompiledDroolsWorkbench

      [INFO]    Computing all possible rebind results for 'org.jboss.errai.enterprise.client.jaxrs.JaxrsProxyLoader'

      [INFO]       Rebinding org.jboss.errai.enterprise.client.jaxrs.JaxrsProxyLoader

      [INFO]          Invoking generator org.jboss.errai.enterprise.rebind.JaxrsProxyLoaderGenerator

      [INFO]             Checking ErraiApp.properties for configured types ...

      [INFO]    Computing all possible rebind results for 'org.jboss.errai.ioc.client.container.IOCEnvironment'

      [INFO]       Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment

      [INFO]          Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCEnvironmentGenerator

      [INFO]             Generating Extensions Bootstrapper...

      [INFO]       Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment

      [INFO]          Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCEnvironmentGenerator

      [INFO]             Generating Extensions Bootstrapper...

      [INFO]    Computing all possible rebind results for 'org.jboss.errai.ioc.client.Bootstrapper'

      [INFO]       Rebinding org.jboss.errai.ioc.client.Bootstrapper

      [INFO]          Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator

      [INFO]             generating ioc bootstrapping code...

      [ERROR] org.jboss.errai.ioc.rebind.ioc.exception.InjectionFailure: can't resolve bean: org.guvnor.common.services.shared.security.KieWorkbenchACL ( @Default ); at injection point: org.kie.workbench.common.screens.projecteditor.client.editor.ProjectScreenPresenter.(org.kie.workbench.common.screens.projecteditor.client.editor.ProjectScreenView a0, org.guvnor.common.services.project.context.ProjectContext a1, org.jboss.errai.common.client.api.Caller<org.kie.workbench.common.screens.projecteditor.service.ProjectScreenService> a2, org.jboss.errai.common.client.api.Caller<org.guvnor.common.services.project.builder.service.BuildService> a3, javax.enterprise.event.Event<org.guvnor.common.services.project.builder.model.BuildResults> a4, javax.enterprise.event.Event<org.uberfire.workbench.events.NotificationEvent> a5, javax.enterprise.event.Event<org.uberfire.client.workbench.events.ChangeTitleWidgetEvent> a6, org.kie.workbench.common.screens.projecteditor.client.validation.ProjectNameValidator a7, org.uberfire.client.mvp.PlaceManager a8, org.kie.uberfire.client.common.BusyIndicatorView a9, org.guvnor.common.services.shared.security.KieWorkbenchACL a10, org.jboss.errai.common.client.api.Caller<org.guvnor.asset.management.service.AssetManagementService> a11)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil.getOrCreateProxy(InjectUtil.java:561)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil.getInjectorOrProxy(InjectUtil.java:537)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil.resolveInjectionDependencies(InjectUtil.java:616)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil$1.generateConstructor(InjectUtil.java:108)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.injector.basic.TypeInjector.renderProvider(TypeInjector.java:138)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.injector.basic.TypeInjector.getBeanInstance(TypeInjector.java:204)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil.getInjectorOrProxy(InjectUtil.java:527)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil.getInjectorOrProxy(InjectUtil.java:441)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.injector.api.InjectionTask.doTask(InjectionTask.java:116)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil.handleInjectionTasks(InjectUtil.java:164)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil.access$000(InjectUtil.java:73)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil$1.generateConstructor(InjectUtil.java:122)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.injector.basic.TypeInjector.renderProvider(TypeInjector.java:138)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCConfigProcessor$3.handle(IOCConfigProcessor.java:404)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCConfigProcessor$7.process(IOCConfigProcessor.java:673)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCConfigProcessor.process(IOCConfigProcessor.java:619)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generateBootstrappingClassSource(IOCBootstrapGenerator.java:299)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generate(IOCBootstrapGenerator.java:141)

      [ERROR] at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator.generate(IOCGenerator.java:69)

      [ERROR] at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:67)

      [ERROR] at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:55)

      [ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:262)

      [ERROR] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

      [ERROR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

      [ERROR] at java.lang.Thread.run(Thread.java:744)

       

      If I re-comment the injection in the first link (RepositoryStructurePresenter) compilation is OK.

       

      If I also change injection in the second link (ProjectScreenPresenter) to be the implementation KieWorkbenchACLImpl compilation is OK.

       

      Any ideas what could be the problem? It smells like an Errai IOC issue, but I don't want to make that assumption.

       

      Thanks,

       

      Mike