'Selenium: Unknown HttpClient Factory netty

While executing selenium code using ProcessBuilder (java), I get the following error message:

Exception in thread "main" java.lang.ExceptionInInitializerError
at org.openqa.selenium.remote.HttpCommandExecutor.getDefaultClientFactory(HttpCommandExecutor.java:62)
at org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:87)
at org.openqa.selenium.remote.service.DriverCommandExecutor.<init>(DriverCommandExecutor.java:80)
at org.openqa.selenium.chromium.ChromiumDriverCommandExecutor.<init>(ChromiumDriverCommandExecutor.java:35)
at org.openqa.selenium.chrome.ChromeDriver$ChromeDriverCommandExecutor.<init>(ChromeDriver.java:118)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:106)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:93)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:48)
at SeleniumProto.main(SeleniumProto.java:7)
Caused by: java.lang.IllegalArgumentException: Unknown HttpClient factory netty
  at org.openqa.selenium.remote.http.HttpClient$Factory.create(HttpClient.java:57)
  at org.openqa.selenium.remote.http.HttpClient$Factory.createDefault(HttpClient.java:73)
  at org.openqa.selenium.remote.HttpCommandExecutor$DefaultClientFactoryHolder.<clinit>(HttpCommandExecutor.java:58)
  ... 9 more

Process finished with exit code 1

The selenium code is below:

   import org.openqa.selenium.chrome.ChromeDriver;

public class SeleniumProto {
    public SeleniumProto() {
    }

    public static void main(String[] var0) {
        System.setProperty("webdriver.chrome.driver", "C:\\Users\\OneDrive\\Documents\\chromedriver.exe");
        ChromeDriver var1 = new ChromeDriver();
        var1.get("https://www.twitter.com");
    }
}

There aren't many answers on the web on how to resolve this issue.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source