title: Creating a new WebDriver causes StackOverflowError
body: <p>I'm just trying to get setup and have the ability to run the <a href="http://seleniumhq.org/docs/03_webdriver.html#introducing-the-selenium-webdriver-api-by-example">example</a> from Selenium's website. However I've narrowed it down to the FirefoxDriver constructor causing a StackOverflowError. I get the same behavior with InternetExplorerDriver, but not HtmlUnitDriver.</p>
  
  <p>The following code</p>
  
  <pre><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();
      }
  }
  </code></pre>
  
  <p>Produces the following stacktrace:</p>
  
  <pre><code>java.lang.StackOverflowError
    at java.lang.Exception.&lt;init&gt;(Unknown Source)
    at java.lang.reflect.InvocationTargetException.&lt;init&gt;(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.&lt;init&gt;(JSONObject.java:272)
    at org.json.JSONObject.wrap(JSONObject.java:1539)
    at org.json.JSONObject.populateMap(JSONObject.java:939)
    at org.json.JSONObject.&lt;init&gt;(JSONObject.java:272)
    at org.json.JSONObject.wrap(JSONObject.java:1539)
    at org.json.JSONObject.populateMap(JSONObject.java:939)
    at org.json.JSONObject.&lt;init&gt;(JSONObject.java:272)
    at org.json.JSONObject.wrap(JSONObject.java:1539)
    at org.json.JSONObject.populateMap(JSONObject.java:939)
    at org.json.JSONObject.&lt;init&gt;(JSONObject.java:272)
    at org.json.JSONObject.wrap(JSONObject.java:1539)
    at org.json.JSONObject.populateMap(JSONObject.java:939)
    at org.json.JSONObject.&lt;init&gt;(JSONObject.java:272)
    at org.json.JSONObject.wrap(JSONObject.java:1539)
    at org.json.JSONObject.populateMap(JSONObject.java:939)
    at org.json.JSONObject.&lt;init&gt;(JSONObject.java:272)
    :
    :
  </code></pre>
  
  <p>I'm using selenium-java-2.22.0 and the json jar that was packaged with the download (which is json-20080701.jar)</p>
  
  <p>Also of note, when running the new FirefoxDriver, Firefox does launch and you see a new tab page. With InternetExplorerDriver, no window opens, but it produces the same stacktrace with JSONObject looping infinitely. I'm running Firefox 12.0 and IE9 on Windows 7.</p>