OS: Ubuntu 14.04
Selenium Version: 2.53
Browser: Firefox
Browser Version: 45.0
Creating an instance of FirefoxDriver should work.
I crash with following message : java.lang.NoClassDefFoundError: org/openqa/selenium/io/CircularOutputStream
import org.openqa.selenium.firefox.FirefoxDriver;
public class SeleniumCrash {
public static void main(String[] args) {
new FirefoxDriver();
}
}
Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/io/CircularOutputStream
at org.openqa.selenium.firefox.FirefoxBinary.<init>(FirefoxBinary.java:60)
at org.openqa.selenium.firefox.FirefoxBinary.<init>(FirefoxBinary.java:56)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:120)
at SeleniumCrash.main(SeleniumCrash.java:6)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.io.CircularOutputStream
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)
... 9 more
I had in my classpath an older version of selenium-remote-driver artefact (because of phantomJS webdriver). Sorry for noise.
How did you resolve this? I tried to use an older version of selenium but it cannot handle new firefox versions. I need to include in my project firefoxdriver as well as ghostdriver
mvn dependency:tree helped me. Some dependencies of Selenium were resolved to inconsistent versions.
Most helpful comment
I had in my classpath an older version of selenium-remote-driver artefact (because of phantomJS webdriver). Sorry for noise.