title: Selenium org.openqa.selenium.logging.LoggingHandler
body: <p>So I am working with Java 8 attempting to create a simple Selenium project but getting errors about the loggingHandler. I have searched online for an answer ,but the only post I found the solutions was to down grade one of the dependencies. Any assistance would be appreciated.</p>
  
  <pre><code>import org.junit.runner.RunWith;
  import org.openqa.selenium.By;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.chrome.ChromeDriver;
  import org.springframework.boot.test.context.SpringBootTest;
  import org.springframework.test.context.junit4.SpringRunner;
  import org.testng.annotations.AfterTest;
  import org.testng.annotations.BeforeTest;
  import org.testng.annotations.Test;
  
  import java.io.*;
  import java.util.ArrayList;
  import java.util.List;
  import java.util.concurrent.TimeUnit;
  
  
  @RunWith(SpringRunner.class)
  @SpringBootTest
  public class AutoDrive {
      @Test
      public void findElementbyXpath() {
        System.setProperty("webdriver.chrome.driver", "/Users/xxxx/dev/demo/src/main/resources/chromedriver");
      WebDriver driver = new ChromeDriver();
  
      driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
      driver.get("http:www.google.com");
  
      //Maximizes the browser window
      driver.manage().window().maximize();
  
      for (String word : sampleList) {
          //find text field
          driver.findElement(By.name("typeahead-combine")).sendKeys(word);
          //wait for results
          driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
      }
      //close browser
      driver.close();
      driver.quit();
  }
  </code></pre>
  
  <p>I have these dependencies:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
      &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
      &lt;version&gt;3.8.1&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
      &lt;artifactId&gt;selenium-api&lt;/artifactId&gt;
      &lt;version&gt;3.8.1&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
      &lt;artifactId&gt;selenium-support&lt;/artifactId&gt;
      &lt;version&gt;3.8.1&lt;/version&gt;
  &lt;/dependency&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.8.1&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
      &lt;artifactId&gt;selenium-chrome-driver&lt;/artifactId&gt;
      &lt;version&gt;3.8.1&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>When trying to run I get:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: org/openqa/selenium/logging/LoggingHandler
      at com.example.demo.AutoComplete.findElementbyXpath(AutoComplete.java:60)
      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:498)
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
      at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
      at org.testng.TestRunner.privateRun(TestRunner.java:767)
      at org.testng.TestRunner.run(TestRunner.java:617)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
      at org.testng.SuiteRunner.run(SuiteRunner.java:240)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
      at org.testng.TestNG.run(TestNG.java:1031)
      at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
      at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)
  
      Caused by: java.lang.ClassNotFoundException: 
      org.openqa.selenium.logging.LoggingHandler
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 24 more
  </code></pre>