Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

SafariDriver Throws NoSuchMethodError #5260

Closed
lukeis opened this issue Mar 4, 2016 · 5 comments
Closed

SafariDriver Throws NoSuchMethodError #5260

lukeis opened this issue Mar 4, 2016 · 5 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 5260

Environment:
  Mac OS X 10.7.5, 
  Safari Version 6.0.2 (7536.26.17)
  selenium-java-2.31.0.jar,
  java version "1.6.0_41"
  Java(TM) SE Runtime Environment (build 1.6.0_41-b02-445-11M4107)
  Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-445, mixed mode)

Code: 
  private WebDriver createSafariDriver() {
    SafariDriver dvr = new SafariDriver(); //<--Exception occurs here (WebScriptRunner.java:509)
    return dvr;
  }

Result: Browser starts but SeleniumDriver throws exception:
  Feb 28, 2013 1:07:29 PM org.openqa.selenium.safari.SafariDriverServer start
  INFO: Server started on port 18715
  (java.lang.NoSuchMethodError: com.google.common.base.Platform.systemNanoTime()J)

  java.lang.NoSuchMethodError: com.google.common.base.Platform.systemNanoTime()J
    at com.google.common.base.Ticker$1.read(Ticker.java:60)
    at com.google.common.base.Stopwatch.start(Stopwatch.java:114)
    at org.openqa.selenium.safari.SafariDriverCommandExecutor.start(SafariDriverCommandExecutor.java:101)
    at org.openqa.selenium.safari.SafariDriver.startClient(SafariDriver.java:71)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:115)
    at org.openqa.selenium.safari.SafariDriver.<init>(SafariDriver.java:57)
    at org.openqa.selenium.safari.SafariDriver.<init>(SafariDriver.java:52)
    at com.tsys.seleniumrunner.WebScriptRunner.createSafariDriver(WebScriptRunner.java:509)
  etc...

Browser instance remains with this on page:
  SafariDriver Client

  [  0.009s] [safaridriver.client] Requesting connection at ws://localhost:4063...
  [  0.040s] [safaridriver.client] Request acknowledged; connecting...

Any ideas?

Reported by etfloyd98 on 2013-02-28 20:04:18

@lukeis lukeis self-assigned this Mar 4, 2016
@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

What's your classpath? Does it include guava or google-collections? Which versions?

Reported by barancev on 2013-02-28 20:48:41

  • Status changed: NeedsClarification
  • Labels added: Lang-Java

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

That was it! Indirect jar conflict: the project build path had a dependency on another
Eclipse project which included an older version of Guava in its classpath. When I removed
the dependency, the error went away. Thank you!

Reported by etfloyd98 on 2013-02-28 20:56:21

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by barancev on 2013-02-28 20:57:49

  • Status changed: Invalid
  • Labels removed: Status-Untriaged

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I don't found this kind of dependance or conflict in my class path, hence this error
occurred. Any clue ?

Reported by saarrthi.developers on 2015-02-25 07:18:41

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 18:16:55

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 4, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant