title: Selenium remoteWebDriver : connection to selenium-standalone-server fail (driver version unknown)
body: <p>I received an exception after trying to setup a connection to selenium-server-standalone by using remoteWebDriver in an application test written in Java.</p>
  
  <p>The issue is related the usage of remoteWebDriver  starting selenium-server-standalone (with  Xvfb)   by using maven (because by running manually by a different session  Xvfb and then selenium-server stand alone the application test is working). 
  The environment is composed by RH Linux R4.1.x , Selenium  2.1, firefox  3.6. Both selenium-server-standalone and application test are executed on the same machine (Virtual Machine).</p>
  
  <p>As previously said, the application test run successfully connecting to the instance of selenium-server-standalone-2.21.0 if this instance is started by a separate PUTTY session  (separate from the one used for starting the application test) with the following commands:</p>
  
  <pre><code>#Xvfb :20 &amp;
  #export DISPLAY=:20
  #Java –Dwebdriver.firefox.firefox=“/opt/firefox/firefox”  –jar selenium-server-standalone-2-.21.0.jar  -port 4441.
  </code></pre>
  
  <p>The application test code for connecting to selenium-server-standalone is the following :</p>
  
  <pre><code>DesiredCapabilities capability = DesiredCapabilities.firefox();
  capability.setPlatform(Platform.LINUX);
  WebDriver driver = new RemoteWebDriver (new URL("http://127.0.0.1:14444/wd/hub"),capability);
  driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
  </code></pre>
  
  <p>Now trying to use maven for starting also xvfb and selenium-server-stand alone before starting the application test I get the following error (then within same putty session):</p>
  
  <pre><code>selenium server conenction string: http://127.0.0.1:14444/wd/hub
  brand community file name orig :/opt/optism_svn/trunk/ITests/Projects/core/bbCampaigns/BrandCommunitiesWD/src/test/resources/Orig_BrandCommunity_Test6386.csv
  before connecting to web driver
  15:17:05.591 INFO - Executing: [new session: {platform=LINUX, browserName=firefox, version=}] at URL: /session)
  15:17:05.651 WARN - Exception thrown
  java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
  Build info: version: '2.2.1', revision: '16551', time: '2012-04-11 21:42:35'
  System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.18-194.el5', java.version: '1.6.0_22'
  Driver info: driver.version: unknown
          at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
          at java.util.concurrent.FutureTask.get(FutureTask.java:83)
          at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:158)
          at org.openqa.selenium.remote.server.DefaultSession.&lt;init&gt;(DefaultSession.java:112 )
          at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:89)
          at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:92)
          at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:62)
          at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:202)
          at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:597)
          at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:548)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
          at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:520)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
          at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
          at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:677)
          at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
          at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
          at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
          at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
          at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
          at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
          at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
          at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
          at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:357)
          at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
  Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
  Build info: version: '2.2.1', revision: '16551', time: '2012-04-11 21:42:35'
  System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.18-194.el5', java.version: '1.6.0_22'
  **Driver info: driver.version: unknown**
          at org.openqa.selenium.remote.server.DefaultDriverFactory.callConstructor(DefaultDriverFactory.java:68)
          at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:52)
          at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:197)
          at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:184)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:151)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)
  Caused by: java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
          at org.openqa.selenium.remote.server.DefaultDriverFactory.callConstructor(DefaultDriverFactory.java:58)
          ... 9 more
  **Caused by: java.lang.IllegalStateException: The path to the chromedriver executable must be set by the webdriver.chrome.driver system property**
          at com.google.common.base.Preconditions.checkState(Preconditions.java:172)
          at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:90)
          at org.openqa.selenium.chrome.ChromeDriver.&lt;init&gt;(ChromeDriver.java:107)
          ... 14 more
  **15:17:05.659 WARN - Exception: The path to the chromedriver executable must be set by the  webdriver.chrome.driver system property**
  </code></pre>
  
  <p>The pom.xml used for starting xvfb and selenium server is the following one (extract of part related xvfb and selenium) :</p>
  
  <pre><code>&lt;properties&gt;
      &lt;!-- Dependencies --&gt;
      &lt;selenium-version&gt;2.21.0&lt;/selenium-version&gt;
  &lt;selenium-plugin-version&gt;2.3&lt;/selenium-plugin-version&gt;
  
  &lt;dependency&gt;
  &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
  &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
  &lt;version&gt;${selenium-version}&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>.....</p>
  
  <pre><code>&lt;plugin&gt;
  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
  &lt;artifactId&gt;selenium-maven-plugin&lt;/artifactId&gt;
  &lt;version&gt;${selenium-plugin-version}&lt;/version&gt;
  &lt;configuration&gt;
  &lt;background&gt;true&lt;/background&gt;
  &lt;port&gt;14444&lt;/port&gt;
  &lt;/configuration&gt;
  &lt;executions&gt;
  
  &lt;execution&gt;
  &lt;id&gt;xvfb&lt;/id&gt;
  &lt;phase&gt;pre-integration-test&lt;/phase&gt;
  &lt;goals&gt;
  &lt;goal&gt;xvfb&lt;/goal&gt;
  &lt;/goals&gt;
  ….                      
  &lt;execution&gt;
  &lt;id&gt;start-selenium-server&lt;/id&gt;
  &lt;phase&gt;pre-integration-test&lt;/phase&gt;
  &lt;goals&gt;
  &lt;goal&gt;start-server&lt;/goal&gt;
  &lt;/goals&gt;
  &lt;/execution&gt;
  </code></pre>