web Magic報錯 NoSuchMethodError NoSuchMethodError: com.google.common.util.concurrent.SimpleTimeLimiter


webMagic使用selenium的時候遇到報錯:

java.lang.NoSuchMethodError: com.google.common.util.concurrent.SimpleTimeLimiter.create(Ljava/util/concurrent/ExecutorService;)Lcom/google/common/util/concurrent/SimpleTimeLimiter;

 

原因:這是由於selenium的版本跟guava和gson版本不一致引起的。

解決方法:

<dependency>
	<groupId>com.google.guava</groupId>
	<artifactId>guava</artifactId>
	<version>23.0</version>
</dependency>
<dependency>
	<groupId>com.google.code.gson</groupId>
	<artifactId>gson</artifactId>
	<version>2.8.2</version>
</dependency>

 

可參考github上的issues:https://github.com/citrusframework/citrus/issues/294


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM