If the error message is "invalid url", check the url on the webpage that you are trying to access, then compare it to what prints out when you do something like:
System.out.println(url);
When selenium tries to open up a webpage, it needs the exact url. It wont infer the Hyper Text Transfer Protocol (http:// or https://). In other words, if you try driver.get(url), and url is returning www.myurl.com, it will likely fail if http or https was not appended.
//Append the Hyper Text Transfer Protocol to the url
driver.get("http://" + url);
If you are getting your urls from a list, or from a file, and you know which protocol your website page(s) use (http:// or https://), you can do something like:
public static void getURLByDriverFromList(List<String> urls) {
for(List<String> url : urls) {
if(!url.contains("http://") {
url = "http://" + url;
}
driver.get(url);
}
}