title: Java REST service - Unable to open resource url
body: <p>Initially i have developed web scraping using chrome to scrape the data from the required websites,so now i want to convert in this java application into REST service,
  so below is my code , while executing received "<code>unable to open resource url make sure the project has been deployed successfully and the server is running</code>"</p>
  
  <pre><code> @GET
   @Produces("text/plain")
   public String getText() throws InterruptedException {
           WebDriver driver;
           File file = new File("resources/chromedriver.exe");
           String absolutePath = file.getAbsolutePath();
           System.setProperty("webdriver.chrome.driver", absolutePath);
           ChromeOptions options = new ChromeOptions();
          options.addArguments("headless");
          options.addArguments("window-size=1200x600");
          driver = new ChromeDriver(options);
          Thread.sleep(2000);
          driver.manage().deleteAllCookies();
          driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
          driver.get("http://google.com");
  
                      WebDriverWait wait = new WebDriverWait(driver,
                              timeoutInSeconds);
                      wait.until((ExpectedCondition&lt;Object&gt;) new ExpectedCondition&lt;Object&gt;() {
  
                          @Override
                          public Object apply(@Nullable WebDriver input) {
                              WebElement divProgress = input.findElement(By
                                      .id("phasesTableContainer"));
                              return divProgress;
                          }
                      });
                      Thread.sleep(3000);
  
                      String price = driver.findElement(By.xpath("//span[@data-dojo-attach-point='price']")).getText();
  return price;
  </code></pre>
  
  <p>received "<code>unable to open resource url make sure the project has been deployed successfully and the server is running</code></p>
  
  <p>from server (glass fish) -</p>
  
  <pre><code>Info:   Initiating Jersey application, version Jersey: 2.0 2013-05-03 14:50:15...
  Warning:   StandardWrapperValve[com.fee.ApplicationConfig]: Servlet.service() for servlet com.fee.ApplicationConfig threw exception
  java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
      at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:124)
      at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:33)
      at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:139)
      at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:335)
      at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:89)
      at org.openqa.selenium.chrome.ChromeDriver.&lt;init&gt;(ChromeDriver.java:157)
      at com.usfee.MyPathResource.getText(MyPathResource.java:66)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  </code></pre>
  
  <p>Note: i'm new to this (REST service), please guide me 
  Problem in the below line</p>
  
  <pre><code>driver = new ChromeDriver();
  </code></pre>