title: What dependency is missing when I get java.lang.NoClassDefFoundError: javax/ws/rs/client/RxInvokerProvider error?
body: <p>I have a small project where for testing purposes I execute my jersey 2 client by unit test. But, unfortunately, I got the error attached. I don't know what dependency still missing. At the moment Jersey's webpage is down due to maintenance.</p>
  
  <p>I put the same  Relevant part of pom.xml, test code and tested code also attached.</p>
  
  
  
  <pre><code>public void getWorkItems() {
          ClientConfig clientConfig = new ClientConfig();
          clientConfig.property(ClientProperties.READ_TIMEOUT, 2000);
          Client client = ClientBuilder.newClient(clientConfig);    
  
          WebTarget webTarget = client.target("https://fabrikam.visualstudio.com/DefaultCollection/_apis/wit/workitems?ids=100,101&amp;api-version=1.0");
  
          Invocation.Builder inBuilder = webTarget.request(MediaType.APPLICATION_JSON_TYPE);
          Response response = inBuilder.get();    
      }
  
  
  public class WorkItemTests {
  
      @Test
      public void Vsts_Test() {
          WorkItems workItems = new WorkItems();
          workItems.getWorkItems();
      }        
  }
  </code></pre>
  
  
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.20&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;includes&gt;
                          &lt;include&gt;**/*Tests.java&lt;/include&gt;
                      &lt;/includes&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;dependencies&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;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;stuff&lt;/groupId&gt;
              &lt;artifactId&gt;Vsts.Connector&lt;/artifactId&gt;
              &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.glassfish.jersey.core&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-client&lt;/artifactId&gt;
              &lt;version&gt;RELEASE&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;RELEASE&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.0.1&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;7.0&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;7.0&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.25.1&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;properties&gt;
          &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
      &lt;/properties&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: javax/ws/rs/client/RxInvokerProvider
  
      at org.glassfish.jersey.internal.inject.Providers.getJaxRsProviderInterfaces(Providers.java:114)
      at org.glassfish.jersey.internal.inject.Providers.&lt;clinit&gt;(Providers.java:87)
      at org.glassfish.jersey.internal.AbstractRuntimeDelegate.&lt;init&gt;(AbstractRuntimeDelegate.java:86)
      at org.glassfish.jersey.server.internal.RuntimeDelegateImpl.&lt;init&gt;(RuntimeDelegateImpl.java:64)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      at java.lang.Class.newInstance(Class.java:442)
      at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:118)
      at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:166)
      at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135)
      at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120)
      at javax.ws.rs.core.UriBuilder.newInstance(UriBuilder.java:95)
      at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:119)
      at org.glassfish.jersey.client.JerseyWebTarget.&lt;init&gt;(JerseyWebTarget.java:71)
      at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:290)
      at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:76)
      at WorkItems.getWorkItems(WorkItems.java:24)
      at WorkItemTests.Vsts_Test2(WorkItemTests.java:18)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
      at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
  Caused by: java.lang.ClassNotFoundException: javax.ws.rs.client.RxInvokerProvider
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 42 more
  
  
  Process finished with exit code -1
  </code></pre>