How to overcome for the com.google.guava dependency
Lets say you are writing a simple selenium web driver code and when you run the test you may come across an error as below[1]. This issue occurs because the selenium project does not have the guava dependencies included in the project path.
So the solution for this is to include the dependencies as [2] and recompile the project.
[RemoteTestNG] detected TestNG version 6.14.2
FAILED: runTest
java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>22.0</version>
</dependency>
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client-appengine</artifactId>
<version>1.23.0</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava-jdk5</artifactId>
</exclusion>
</exclusions>
</dependency>
Comments
Post a Comment