java.lang.NoSuchMethodError: com.google.common.base.Preconditions

前端 未结 2 1917
野趣味
野趣味 2021-01-27 15:53

Im getting this error

java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/         


        
相关标签:
2条回答
  • 2021-01-27 16:06

    Looks like a classpath issue. What version of guava-X.jar do you have in our classpath? (most probably in WEB-INF/lib of webapp). Possible solution is to declare latest version of guava in your pom.xml explicitly. For 3.10.0 of selenium, you need:

    <!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
    <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>24.0-jre</version>
    </dependency>
    
    0 讨论(0)
  • 2021-01-27 16:22

    I found a solution to a possibly related error message when I removed the Google Collections jar from the lib path.

    (Source)

    0 讨论(0)
提交回复
热议问题