title: java.net.URISyntaxException: Expected authority at index 7: http://
body: <p>I am getting error:</p>
  
  <blockquote>
    <p>Caused by: java.net.URISyntaxException: Expected authority at index 7:
    http://</p>
  </blockquote>
  
  <p>For below code:</p>
  
  <pre><code>try 
  {
      return new RemoteWebDriver(new URL("http://" + username + ":" + authkey +"@hub.crossbrowsertesting.com:80/wd/hub"), caps);
  } 
  catch (MalformedURLException e) 
  {
      // TODO Auto-generated catch block
      e.printStackTrace();
      return null;
   }
  </code></pre>
  
  <p>Stack trace:</p>
  
  <blockquote>
    <p>Driver info: driver.version: RemoteWebDriver
          at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:622)
          at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
          at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:128)
          at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:155)
          at abc.testcase.LoginForm2.main(LoginForm2.java:45)
        Caused by: org.apache.http.client.ClientProtocolException
          at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
          at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
          at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
          at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:142)
          at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:88)
          at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:108)
          at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:64)
          at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
          at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
          ... 4 more
        Caused by: org.apache.http.HttpException: Cannot convert host to URI: http://
          at org.apache.http.impl.conn.SystemDefaultRoutePlanner.determineProxy(SystemDefaultRoutePlanner.java:77)
          at org.apache.http.impl.conn.DefaultRoutePlanner.determineRoute(DefaultRoutePlanner.java:77)
          at org.apache.http.impl.client.InternalHttpClient.determineRoute(InternalHttpClient.java:124)
          at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:183)
          ... 12 more
        Caused by: java.net.URISyntaxException: Expected authority at index 7: http://
          at java.net.URI$Parser.fail(URI.java:2848)
          at java.net.URI$Parser.failExpecting(URI.java:2854)
          at java.net.URI$Parser.parseHierarchical(URI.java:3102)
          at java.net.URI$Parser.parse(URI.java:3053)
          at java.net.URI.(URI.java:588)
          at org.apache.http.impl.conn.SystemDefaultRoutePlanner.determineProxy(SystemDefaultRoutePlanner.java:75)
          ... 15 more</p>
  </blockquote>
  
  <p>Please help!</p>