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

上一篇:解决_系统启动出现:grub rescue的问题


下一篇:记一次报错 This is very likely to create a memory leak. Stack trace of thread: