title: Appium + Selenium : FAILED CONFIGURATION: @BeforeTest setUp java.lang.NoClassDefFoundError: org/openqa/selenium/remote/codec/w3c/W3CHttpCommandCodec
body: <p>I am using appium studio from where i got the code and  i have copied from it in Eclipse.I have added All maven dependencies even though it is throwing error of <strong>FAILED configuration.</strong> Does anybody help me with this?
  Note: I am here using Real device ios and my platform is mac . java version "11.0.2"</p>
  
  <pre class="lang-java prettyprint-override"><code>package iostestdemo;
  
  import io.appium.java_client.remote.IOSMobileCapabilityType;
  import io.appium.java_client.ios.IOSDriver;
  import io.appium.java_client.ios.IOSElement;
  import io.appium.java_client.remote.MobileCapabilityType;
  import org.openqa.selenium.remote.DesiredCapabilities;
  import org.openqa.selenium.By;
  import org.testng.annotations.*;
  import java.net.URL;
  import java.net.MalformedURLException;
  import java.util.logging.Level;
  
  public class secondTest {
      private String reportDirectory = "reports";
      private String reportFormat = "xml";
      private String testName = "Untitled";
      protected IOSDriver&lt;IOSElement&gt; driver = null;
  
      DesiredCapabilities dc = new DesiredCapabilities();
  
      @BeforeMethod
      public void setUp() throws MalformedURLException {
          dc.setCapability("reportDirectory", reportDirectory);
          dc.setCapability("reportFormat", reportFormat);
          dc.setCapability("testName", testName);
          dc.setCapability(MobileCapabilityType.UDID, "afb65172e9b47b01482d912dede58515819748a3");
          dc.setCapability(IOSMobileCapabilityType.BUNDLE_ID, "com.novo.ios.dev");
          driver = new IOSDriver&lt;IOSElement&gt;(new URL("http://localhost:4723/wd/hub"), dc);
          driver.setLogLevel(Level.INFO);
      }
  
      @Test
      public void testUntitled() {
  
          driver.findElement(By.xpath("//*[@placeholder='Email']")).click();
          driver.findElement(By.xpath(
                  "(//*[@text='Novo - Dev']/*/*[@class='UIAView' and ./*[@class='UIAView' and ./*[@class='UIAView']] and ./parent::*[@class='UIAWindow']])[2]"))
                  .click();
          driver.findElement(By.xpath("//*[@placeholder='Email']")).click();
          driver.findElement(By.xpath("//*[@placeholder='Email']")).sendKeys("ababddvdvd");
          driver.findElement(By.xpath("//*[@placeholder='Password']")).sendKeys("vvv");
          driver.findElement(By.xpath("//*[@text='LOG IN']")).click();
          driver.findElement(By.xpath("//*[@text='OK']")).click();
      }
  }
  </code></pre>
  
  <p>Error that i am facing:</p>
  
  <pre><code>FAILED CONFIGURATION: @BeforeMethod setUp
  java.lang.NoClassDefFoundError: org/openqa/selenium/remote/codec/w3c/W3CHttpCommandCodec
      at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:262)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
      at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41)
      at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
      at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
      at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:212)
      at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:323)
      at org.openqa.selenium.remote.RemoteWebDriver.&lt;init&gt;(RemoteWebDriver.java:130)
      at io.appium.java_client.DefaultGenericMobileDriver.&lt;init&gt;(DefaultGenericMobileDriver.java:37)
      at io.appium.java_client.AppiumDriver.&lt;init&gt;(AppiumDriver.java:86)
      at io.appium.java_client.AppiumDriver.&lt;init&gt;(AppiumDriver.java:96)
      at io.appium.java_client.ios.IOSDriver.&lt;init&gt;(IOSDriver.java:92)
      at iostestdemo.secondTest.setUp(secondTest.java:29)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
      at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)
      at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:458)
      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:523)
      at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
      at org.testng.TestRunner.privateRun(TestRunner.java:648)
      at org.testng.TestRunner.run(TestRunner.java:505)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
      at org.testng.SuiteRunner.run(SuiteRunner.java:364)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
      at org.testng.TestNG.runSuites(TestNG.java:1049)
      at org.testng.TestNG.run(TestNG.java:1017)
      at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
      at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
      at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
  Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.remote.codec.w3c.W3CHttpCommandCodec
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      ... 41 more
  
  SKIPPED: testUntitled
  java.lang.NoClassDefFoundError: org/openqa/selenium/remote/codec/w3c/W3CHttpCommandCodec
      at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:262)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
      at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41)
      at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
      at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
      at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:212)
      at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:323)
      at org.openqa.selenium.remote.RemoteWebDriver.&lt;init&gt;(RemoteWebDriver.java:130)
      at io.appium.java_client.DefaultGenericMobileDriver.&lt;init&gt;(DefaultGenericMobileDriver.java:37)
      at io.appium.java_client.AppiumDriver.&lt;init&gt;(AppiumDriver.java:86)
      at io.appium.java_client.AppiumDriver.&lt;init&gt;(AppiumDriver.java:96)
      at io.appium.java_client.ios.IOSDriver.&lt;init&gt;(IOSDriver.java:92)
      at iostestdemo.secondTest.setUp(secondTest.java:29)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
      at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)
      at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:458)
      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:523)
      at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
      at org.testng.TestRunner.privateRun(TestRunner.java:648)
      at org.testng.TestRunner.run(TestRunner.java:505)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
      at org.testng.SuiteRunner.run(SuiteRunner.java:364)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
      at org.testng.TestNG.runSuites(TestNG.java:1049)
      at org.testng.TestNG.run(TestNG.java:1017)
      at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
      at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
      at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
  Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.remote.codec.w3c.W3CHttpCommandCodec
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      ... 41 more
  
  
  ===============================================
      Default test
      Tests run: 1, Failures: 0, Skips: 1
      Configuration Failures: 1, Skips: 0
  ===============================================
  
  
  ===============================================
  Default suite
  Total tests run: 1, Failures: 0, Skips: 1
  Configuration Failures: 1, Skips: 0
  ===============================================
  </code></pre>
  
  <p>Maven Dependency :</p>
  
  <pre class="lang-xml prettyprint-override"><code>&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;groupId&gt;com.iostestdemo&lt;/groupId&gt;
      &lt;artifactId&gt;iostestdemo&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;dependencies&gt;
          &lt;!-- https://mvnrepository.com/artifact/io.appium/java-client --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.appium&lt;/groupId&gt;
              &lt;artifactId&gt;java-client&lt;/artifactId&gt;
              &lt;version&gt;7.1.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
              &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
              &lt;version&gt;3.141.59&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/org.testng/testng --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.testng&lt;/groupId&gt;
              &lt;artifactId&gt;testng&lt;/artifactId&gt;
              &lt;version&gt;6.14.3&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
              &lt;artifactId&gt;selenium-remote-driver&lt;/artifactId&gt;
              &lt;version&gt;3.14.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-server --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
              &lt;artifactId&gt;selenium-server&lt;/artifactId&gt;
              &lt;version&gt;3.141.59&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>