0 Replies Latest reply on Jun 20, 2018 3:38 PM by Gert Jessen

    Guice configuration error

    Gert Jessen Newbie

      Hi.

       

      I get the following Guice configuration error:

       

      1) No scope is bound to javax.enterprise.context.Dependent.

        at org.jboss.errai.security.server.NonCachingUserServiceImpl.class(NonCachingUserServiceImpl.java:28)

        while locating org.jboss.errai.security.server.NonCachingUserServiceImpl

       

       

      1 error

      at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1004)

      at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:961)

      at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)

      at org.jboss.errai.bus.server.service.ServiceProcessor.createRPCScaffolding(ServiceProcessor.java:233)

      at org.jboss.errai.bus.server.service.ServiceProcessor.processServiceClass(ServiceProcessor.java:98)

      at org.jboss.errai.bus.server.service.ServiceProcessor.process(ServiceProcessor.java:73)

      at org.jboss.errai.bus.server.service.ServiceProcessor.process(ServiceProcessor.java:60)

      at org.jboss.errai.bus.server.service.bootstrap.DiscoverServices.execute(DiscoverServices.java:53)

      at org.jboss.errai.bus.server.service.bootstrap.OrderedBootstrap.execute(OrderedBootstrap.java:56)

      at org.jboss.errai.bus.server.service.ErraiServiceImpl.boostrap(ErraiServiceImpl.java:71)

      at org.jboss.errai.bus.server.service.ErraiServiceImpl.<init>(ErraiServiceImpl.java:66)

      at org.jboss.errai.bus.server.service.ErraiServiceImpl$$FastClassByGuice$$7879947c.newInstance(<generated>)

      at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)

      at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)

      at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)

      at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)

      at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)

      at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)

      at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)

      at com.google.inject.Scopes$1$1.get(Scopes.java:65)

      at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)

      at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54)

      at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)

      at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)

      at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)

      at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)

      at org.jboss.errai.bus.server.service.ErraiServiceFactory.create(ErraiServiceFactory.java:37)

      at org.jboss.errai.bus.server.service.ErraiServiceSingleton.initSingleton(ErraiServiceSingleton.java:43)

      at org.jboss.errai.bus.server.servlet.ServletBootstrapUtil.initService(ServletBootstrapUtil.java:111)

      at org.jboss.errai.bus.server.servlet.ServletBootstrapUtil.getService(ServletBootstrapUtil.java:61)

      at org.jboss.errai.bus.server.servlet.AbstractErraiServlet.init(AbstractErraiServlet.java:94)

      at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.init(DefaultBlockingServlet.java:89)

      at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:616)

      at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:396)

      at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:871)

      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)

      at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)

      at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)

      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)

      at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)

      at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:550)

      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)

      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)

      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)

      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)

      at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:140)

      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)

      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)

      at org.eclipse.jetty.server.Server.start(Server.java:387)

      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)

      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)

      at org.eclipse.jetty.server.Server.doStart(Server.java:354)

      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)

      at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:759)

      at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:634)

      at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:923)

       

      The NonCachingUserServiceImpl.java has a @Dependent scope annotation but the guice injector does does not have this scope in its scope list and throws an exception.

       

      I am trying to upgrade my project from using and errai 2.4.5 version to version 4.1.3-Final and using the following dependencies:

      • errai-common
      • errai-bus
      • errai-ioc
      • errai-tools
      • errai-security-server

       

      I have written my own implementation of AuthenticationService.

       

      Any idea to solve this problem ?