"org.openqa.selenium.WebDriverException: Unsupported Marionette protocol version 2" error coming while running my Selenium Script with Gecko Driver
<p>I have just started learning <code>Selenium</code> <code>Java</code> . I am running my script with <code>Selenium Beta 3</code> and <code>Mozilla Firefox v43</code>. Here is my code`</p>

<pre><code>import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class RegistrationFirefox {

    public static void main(String[] args) 
    {
        System.setProperty("webdriver.gecko.driver", "C:\\SeleniumDrivers\\geckodriver.exe");
        WebDriver driver = new FirefoxDriver();

        driver.get("http://www.google.com");
        System.out.println(driver.getTitle());
        driver.manage().window().maximize();    
        driver.close();
    }    
}
</code></pre>

<p>Initially I was getting the error regarding </p>

<blockquote>
  <p>"Exception in thread "main" java.lang.IllegalStateException: The path
  to the driver executable must be set by the webdriver.gecko.driver</p>
</blockquote>

<p>After installing the <code>geckodriver</code> this is the error I am getting (code mentioned above)</p>

<blockquote>
  <p>Exception in thread "main" org.openqa.selenium.WebDriverException: Unsupported Marionette protocol version 2, required 3 (WARNING: The server did not provide any stacktrace information)
  Command duration or timeout: 5.26 seconds</p>
</blockquote>