Creating a new WebDriver raises a StackOverflowError

I'm just trying to set up and have the ability to run example from the Selenium website. However, I narrowed it down to the FirefoxDriver constructor that raises a StackOverflowError. I get the same behavior with InternetExplorerDriver, but not with HtmlUnitDriver.

Following code

import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class WebDriverTest {

    @Test
    public void test() {
        WebDriver driver = new FirefoxDriver();
    }
}

Produces the following stacktrace command:

java.lang.StackOverflowError
  at java.lang.Exception.<init>(Unknown Source)
  at java.lang.reflect.InvocationTargetException.<init>(Unknown Source)
  at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.json.JSONObject.populateMap(JSONObject.java:937)
  at org.json.JSONObject.<init>(JSONObject.java:272)
  at org.json.JSONObject.wrap(JSONObject.java:1539)
  at org.json.JSONObject.populateMap(JSONObject.java:939)
  at org.json.JSONObject.<init>(JSONObject.java:272)
  at org.json.JSONObject.wrap(JSONObject.java:1539)
  at org.json.JSONObject.populateMap(JSONObject.java:939)
  at org.json.JSONObject.<init>(JSONObject.java:272)
  at org.json.JSONObject.wrap(JSONObject.java:1539)
  at org.json.JSONObject.populateMap(JSONObject.java:939)
  at org.json.JSONObject.<init>(JSONObject.java:272)
  at org.json.JSONObject.wrap(JSONObject.java:1539)
  at org.json.JSONObject.populateMap(JSONObject.java:939)
  at org.json.JSONObject.<init>(JSONObject.java:272)
  at org.json.JSONObject.wrap(JSONObject.java:1539)
  at org.json.JSONObject.populateMap(JSONObject.java:939)
  at org.json.JSONObject.<init>(JSONObject.java:272)
  :
  :

I am using selenium-java-2.22.0 and json jar that were packaged with download (this is json-20080701.jar)

Also note that when you start a new FirefoxDriver, Firefox starts up and you see a new tab. With the help of InternetExplorerDriver, the window does not open, but it creates the same stack as the JSONObject loop, endlessly. I am running Firefox 12.0 and IE9 on Windows 7.

+5
3

JAR hell

JAR Selenium. , , . , , jar - .

, , , , . , 10 - , . , , . , , . .

. , ... !

... Java Module System, ​​ Java 8 Java 9.

+7

, , , org.json / , , WebDriver (20080701), - .

PS: FTR http://code.google.com/p/selenium/issues/detail?id=4123 " ", , , -.

+1

json , , /Selenium-x.xx/lib/json-20080701.jar

0

All Articles