java.lang.NoClassDefFoundError: org/apache/http/auth/Credentials
Version: Selenium 3.0.1 OS: Windows 10, Eclipse neon
Unable to initialize the chrome driver in the latest selenium 3.x same code works fine with 2.53.x, the stacktrace is copied below, seems like ApacheHttpClient reference is broken. anyideas?
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/auth/Credentials
at org.openqa.selenium.remote.HttpCommandExecutor.getDefaultClientFactory(HttpCommandExecutor.java:92)
at org.openqa.selenium.remote.HttpCommandExecutor.
Check your classpath, you should have httpclient 4.5.2 You likely need to update libs or if using maven check to see if another dependency is including a different version.
For further support I recommend asking on the google group - https://groups.google.com/forum/#!forum/selenium-users
@ishwar6789 I 've had the same issue with mentioned versions of Selenium and Eclipse. It turned out some jars were corrupted (therefor NoClassDefFoundError). Fix: Close Eclipse. Go to C:\Users\MySelf.m2\repository and delete folders. Open Eclipse again and use Alt+F5 on project; check option Force Update of Snapshots. Hope it works for you too :)