***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
springfox.documentation.spring.web.scanners.ApiListingReferenceScanner.scan(ApiListingReferenceScanner.java:59)
The following method did not exist:
com.google.common.collect.Multimaps.asMap(Lcom/google/common/collect/ListMultimap;)Ljava/util/Map;
The method's class, com.google.common.collect.Multimaps, is available from the following locations:
jar:file:/usr/local/tomcat/webapps/ROOT/WEB-INF/lib/hive-exec-1.1.0-cdh5.14.0.jar!/com/google/common/collect/Multimaps.class
jar:file:/usr/local/tomcat/webapps/ROOT/WEB-INF/lib/guava-20.0.jar!/com/google/common/collect/Multimaps.class
It was loaded from the following location:
file:/usr/local/tomcat/webapps/ROOT/WEB-INF/lib/hive-exec-1.1.0-cdh5.14.0.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of com.google.common.collect.Multimaps
Caused by: org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NoSuchMethodError: com.google.common.collect.Multimaps.asMap(Lcom/google/common/collect/ListMultimap;)Ljava/util/Map;
根据日志信息可以明白,有两个地方引用了jar包中的某个方法(/com/google/common/collect/Multimaps.class),归根到底就是重复引用了jar包。通过在项目中查看jar包依赖关系,根据实际需要去掉一个jar包依赖即可。当然报错日志肯定不止这点,但后续的报错都是因为jar包重复引用导致的,找到主要问题并解决就行了。
日志中提示了jar包:hive-exec-1.1.0-cdh5.14.0.jar 和 guava-20.0.jar,而 hive-exec-1.1.0-cdh5.14.0.jar 中包含了 guava-20.0.jar ,那么,这里直接去掉后者的依赖即可。
啥,你以为就这样就完了吗?我遇到的可是一大堆报错哦!
哦,不是啊!啥?你也遇到很多报错啊!来看看下面这个报错及解决汇总文章:
Hive连接+Kerberos认证各种报错及解决办法汇总
启动报错-重复引用jar包报错信息:***************************APPLICATION FAILED TO START***************************Description:An attempt was made to call a method that does not exist. The attempt was made from the following location: springfox.documentation.spr
SLF4J: Actual binding is of type [org.
ap
ache.logging.slf4j.Log4jLoggerFactory]
Exception in thread “main”
java
.
lan
g.
NoSuchMethodError
:
com
.
google
.
common
.base.Preconditions.checkArgument(ZL
java
/
lan
g/String;L
java
/
lan
g/Obj
ect
;)V
at org.
ap
ache.hadoop.conf.Conf
org.
ap
ache.catalina.LifecycleException: Failed to start
com
ponent [StandardServer[7005]]
at org.
ap
ache.catalina.util.LifecycleBase.start(LifecycleBase.
java
:167)
at org.
ap
ache.catalina.startup.Catalina.start(Catalina.
java
:68
在测试hive0.14.0 on tez时遇到的问题比较多:1.在使用cdh5.2.0+hive0.14.0+tez-0.5.0测试时,首先遇到下面的问题
java
.
lan
g.
NoSuchMethodError
:org.
ap
ache.tez.dag.
ap
i.client.Progress.getFailedTaskAttemptCount()I
atorg....
17:45:59.203 [background-preinit] DE
BUG
org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver - Cannot find
java
x.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable.
An attempt was made to call the method
com
.
google
.
common
.
coll
ect
.
Multi
maps
.
asM
ap
(L
com
/
google
/
common
/
coll
ect
/List
Multi
m
ap
;)L
java
/util/M
ap
; but it does not exist. Its class,
com
.
google
.
common
.
coll
ect
.
Multi
maps
, is available from the following locations:
问题描述:
今天新安装的flume,使用flume来做kafka与hive对接时出现了以下两个的错误:
Caused by: org.
ap
ache.hive.hcatalog.streaming.Conn
ect
ionError: HiveEndPoint{metaStoreUri='thrift://localhost:9083', database='db', table='student', partitionVals=}
(HiveWriter.
java
:99)
at org.
ap
ache.flum
java
.
lan
g.
nosuchmethoderror
:
com
.
google
.
common
.base.preconditions.checkargument