title: Who can I fix the MultiException regarding jersey hk2 SystemInjecteeImpl
body: <p>I have a J2EE application with Tomcat 8.5. Now I try to use CDI in a rest service based on jersey 2.26-b03. But when I try to invoke the method <code>deviceController.getDevices().get("2").getCurrentvalue()</code>in the rest service <code>allDevices()</code> in class     SimpleRestService     I get the MultiException:</p>
  
  <pre><code>WARNING: Unknown HK2 failure detected:
  MultiException stack 1 of 3
  org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at SystemInjecteeImpl(requiredType=DeviceController,parent=SimpleRestfulService,qualifiers={},position=-1,optional=false,self=false,unqualified=null,1466685742)
  at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:74)
  at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:214)
  at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:237)
  at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:360)
  at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
  at org.glassfish.jersey.hk2.RequestContext.findOrCreate(RequestContext.java:83)
  at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2064)
  at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:711)
  at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:653)
  at org.glassfish.jersey.hk2.HK2InjectionManager.getInstance(HK2InjectionManager.java:269)
  at org.glassfish.jersey.internal.inject.Injections.getOrCreate(Injections.java:136)
  at org.glassfish.jersey.server.model.MethodHandler$ClassBasedMethodHandler.getInstance(MethodHandler.java:284)
  at org.glassfish.jersey.server.internal.routing.PushMethodHandlerRouter.apply(PushMethodHandlerRouter.java:75)
  at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:109)
  at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
  at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
  at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
  at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
  at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:92)
  at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:61)
  at org.glassfish.jersey.process.internal.Stages.process(Stages.java:197)
  at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:329)
  at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
  at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
  at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
  at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
  at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
  at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:280)
  at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:316)
  at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1084)
  at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:418)
  at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:372)
  at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
  at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
  at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
  at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
  at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
  at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
  at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
  at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run
  (ThreadPoolExecutor.java:617)
  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.
  run(TaskThread.java:61)
  at java.lang.Thread.run(Thread.java:745)
  MultiException stack 2 of 3
  java.lang.IllegalArgumentException: While attempting to resolve the 
  dependencies of path.to.restservice.SimpleRestfulService errors were 
  found
  at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies
  (ClazzCreator .java:249)
  at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:360)
  at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
  at org.glassfish.jersey.hk2.RequestContext.findOrCreate(RequestContext.java:83)
  at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2064)
  at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:711)
  at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:653)
  at org.glassfish.jersey.hk2.HK2InjectionManager.getInstance(HK2InjectionManager.java:269)
  at org.glassfish.jersey.internal.inject.Injections.getOrCreate(Injections.java:136)
  at org.glassfish.jersey.server.model.MethodHandler$ClassBasedMethodHandler.getInstance(MethodHandler.java:284)
  at org.glassfish.jersey.server.internal.routing.PushMethodHandlerRouter.apply(PushMethodHandlerRouter.java:75)
  at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:109)
  at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
  at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
  at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
  at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
  at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:92)
  at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:61)
  at org.glassfish.jersey.process.internal.Stages.process(Stages.java:197)
  at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:329)
  at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
  at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
  at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
  at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
  at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
  at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:280)
  at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:316)
  at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1084)
  at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:418)
  at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:372)
  at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
  at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
  at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
  at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
  at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
  at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
  at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
  at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  at java.lang.Thread.run(Thread.java:745)
  MultiException stack 3 of 3
  java.lang.IllegalStateException: Unable to perform operation: resolve on 
  path.to.restservice.SimpleRestfulService
  at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:389)
  at 
  org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
  at 
  org.glassfish.jersey.hk2.RequestContext.findOrCreate 
  (RequestContext.java:83)
  at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2064)
  at org.jvnet.hk2.internal.ServiceLocatorImpl.
  internalGetService(ServiceLocatorImpl.java:711)
  at org.jvnet.hk2.internal.ServiceLocatorImpl.getService
  (ServiceLocatorImpl.java:653)
  at org.glassfish.jersey.hk2.HK2InjectionManager.getInstance 
        (HK2InjectionManager.java:269)
  at org.glassfish.jersey.internal.inject.Injections.getOrCreate(Injections.java:136)
  at org.glassfish.jersey.server.model.MethodHandler$ClassBasedMethodHandler.getInstance(MethodHandler.java:284)
  at org.glassfish.jersey.server.internal.routing.PushMethodHandlerRouter.apply(PushMethodHandlerRouter.java:75)
  at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:109)
  at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
  at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
  at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
  at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
  at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:92)
  at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:61)
  at org.glassfish.jersey.process.internal.Stages.process(Stages.java:197)
  at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:329)
  at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
  at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
  at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
  at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
  at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
  at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:280)
  at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:316)
  at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1084)
  at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:418)
  at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:372)
  at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
  at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
  at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
  at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
  at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
  at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
  at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
  at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run 
  (ThreadPoolExecutor.java:617)
  at 
  org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run
  (TaskThread.jav a:61)
  at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>After that exception I additionally created the class <code>JerseyResourceConfiguration</code> and bind the bean (DeviceController) I want to inject to the rest service (<code>SimpleRestService</code>). But it didn't solve the problem. Next step I tried to inject it via the SimpleRestService-Constructor.</p>
  
  <p>That did not help either. I also experiment with the dependencies of hk2 (see pom.xml - at the moment the hk2-dependencies comment out).</p>
  
  <p>The simple rest service </p>
  
  <pre><code>@Path("simple")
  @RequestScoped
  public class SimpleRestfulService {
  
      @Inject
      private DeviceController deviceController;
  
  
      //private final DeviceController deviceController;
  
      //@Inject
      //public SimpleRestResource(DeviceController deviceController){ 
      //      this.deviceController = deviceController;
      //}
  
  
  
      @GET
      @Produces(MediaType.APPLICATION_JSON)
      @Path("devices")
      public Response allDevices() 
      {
        System.out.println("DeviceController: " + this.
            deviceController.getDevices().get("2").getCurrentvalue());
  
            return Response
                    .status(200)
                    .header("Access-Control-Allow-Origin", "*")
                    .entity("{\"success\":\"Message received\"}")
                    .build();
      }
  }
  </code></pre>
  
  <p>DeviceController (Bean to inject)</p>
  
  <pre><code>@Named
  @SessionScoped
  public class DeviceController implements Serializable {
  
        //methods like getDevices()
  
  }
  </code></pre>
  
  <p>ApplicationCinfiguration class</p>
  
  <pre><code>@ApplicationPath("/api/v1")
  public class RESTApplicationConfiguration extends Application {
  }
  </code></pre>
  
  <p>The JerseyConfiguration class</p>
  
  <pre><code>public class JerseyResourceConfiguration extends ResourceConfig {
  
       public JerseyResourceConfiguration() {
              packages("path.to.restservice");   //SimpleRestSrevice
              register(new AbstractBinder() {
  
                    @Override
                    protected void configure() {
                        bind(new 
                             DeviceController()).to(DeviceController.class);
                    }
                });
       }
  }
  </code></pre>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>I moved the @ApplicationPath from ApplicationConfiguration class</p>
  
  <pre><code>public class RESTApplicationConfiguration extends Application {
  }
  </code></pre>
  
  <p>to JerseyConfiguration class</p>
  
  <pre><code>@ApplicationPath("/api/v1")
  public class JerseyResourceConfiguration extends ResourceConfig {
  
       public JerseyResourceConfiguration() {
              packages("path.to.restservice");   //SimpleRestSrevice
              register(new AbstractBinder() {
  
                    @Override
                    protected void configure() {
                        bind(new 
                             DeviceController()).to(DeviceController.class);
                    }
                });
       }
  }
  </code></pre>
  
  <p>The simple rest service </p>
  
  <pre><code>@Path("simple")
  @RequestScoped
  public class SimpleRestfulService {
  
      @Inject
      private DeviceController deviceController;
  
      @GET
      @Produces(MediaType.APPLICATION_JSON)
      @Path("devices")
      public Response allDevices() 
      {
        System.out.println("DeviceController: " + this.
            deviceController.getDevices().size());
  
            return Response
                    .status(200)
                    .header("Access-Control-Allow-Origin", "*")
                    .entity("{\"success\":\"Message received\"}")
                    .build();
      }
  }
  </code></pre>
  
  <p>But now in the SimpleRestfulService I get not the current state of the bean DeviceController. In the method allDevices() I try to print the size of getDevices() from DeviceController. But I always get zero. But In the bean itself it prints out e.g. 20. </p>
  
  <p>Current pom.xml</p>
  
  <pre><code>&lt;dependencies&gt;
  &lt;!--
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.hk2&lt;/groupId&gt;
      &lt;artifactId&gt;hk2&lt;/artifactId&gt;
      &lt;version&gt;2.5.0&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.hk2&lt;/groupId&gt;
      &lt;artifactId&gt;hk2-utils&lt;/artifactId&gt;
      &lt;version&gt;2.5.0&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.jersey.ext.cdi&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-cdi1x-servlet&lt;/artifactId&gt;
      &lt;version&gt;2.27&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.jersey.inject&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-hk2&lt;/artifactId&gt;
      &lt;version&gt;2.26-b04&lt;/version&gt;
  &lt;/dependency&gt;
  --&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
      &lt;artifactId&gt;guava&lt;/artifactId&gt;
      &lt;version&gt;27.0.1-jre&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.jdom&lt;/groupId&gt;
      &lt;artifactId&gt;jdom&lt;/artifactId&gt;
      &lt;version&gt;2.0.2&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;javax&lt;/groupId&gt;
      &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
      &lt;version&gt;8.0&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.chartistjsf&lt;/groupId&gt;
      &lt;artifactId&gt;ChartistJSF&lt;/artifactId&gt;
      &lt;version&gt;3.0&lt;/version&gt;      
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;4.12&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
      &lt;artifactId&gt;jstl&lt;/artifactId&gt;
      &lt;version&gt;1.2&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.jersey.core&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-common&lt;/artifactId&gt;
      &lt;version&gt;2.26-b03&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.jersey.core&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-server&lt;/artifactId&gt;
      &lt;version&gt;2.26-b03&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.jersey.containers&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-container-servlet-core&lt;/artifactId&gt;
      &lt;version&gt;2.26-b03&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.jersey.containers&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-container-servlet&lt;/artifactId&gt;
      &lt;version&gt;2.26-b03&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish.jersey.media&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-media-json-jackson&lt;/artifactId&gt;
      &lt;version&gt;2.26-b03&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
      &lt;artifactId&gt;jersey-client&lt;/artifactId&gt;
      &lt;version&gt;1.19.4&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;javax.ws.rs&lt;/groupId&gt;
      &lt;artifactId&gt;javax.ws.rs-api&lt;/artifactId&gt;
      &lt;version&gt;2.1.1&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.eclipse.persistence&lt;/groupId&gt;
      &lt;artifactId&gt;eclipselink&lt;/artifactId&gt;
      &lt;version&gt;2.7.0&lt;/version&gt;
  &lt;/dependency&gt;
   &lt;dependency&gt;
      &lt;groupId&gt;org.eclipse.persistence&lt;/groupId&gt;
      &lt;artifactId&gt;javax.persistence&lt;/artifactId&gt;
      &lt;version&gt;2.1.0&lt;/version&gt;
   &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish&lt;/groupId&gt;
      &lt;artifactId&gt;javax.faces&lt;/artifactId&gt;
      &lt;version&gt;2.3.2&lt;/version&gt;
      &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.primefaces&lt;/groupId&gt;
      &lt;artifactId&gt;primefaces&lt;/artifactId&gt;
      &lt;version&gt;6.2&lt;/version&gt;
      &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.primefaces.extensions&lt;/groupId&gt;
      &lt;artifactId&gt;primefaces-extensions&lt;/artifactId&gt;
      &lt;version&gt;6.2.9&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;mysql&lt;/groupId&gt;
      &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
      &lt;version&gt;8.0.7-dmr&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;javax.enterprise&lt;/groupId&gt;
      &lt;artifactId&gt;cdi-api&lt;/artifactId&gt;
      &lt;version&gt;2.0.SP1&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;javax.inject&lt;/groupId&gt;
      &lt;artifactId&gt;javax.inject&lt;/artifactId&gt;
      &lt;version&gt;1&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.jboss.weld.servlet&lt;/groupId&gt;
      &lt;artifactId&gt;weld-servlet&lt;/artifactId&gt;
      &lt;version&gt;2.4.8.Final&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>I expect that the <code>DeviceController</code> bean can be injected successfully to the rest service <code>SimpleRestService</code> an invoke the device list. I also tried different solutions from other questions with the hk2-dependencies but the result is always the same.</p>
  
  <p>Can anybody see whats wrong?</p>