An attempt was made to call the method com.google.common.collect.Multimaps.asMap(Lcom/google/common/collect/ListMultimap;)Ljava/util/Map; but it does not exist. Its class, com.google.common.collect.Multimaps, is available from the following locations:
jar:file:/D:/tools/maven/data/org/apache/hive/hive-exec/1.1.0-cdh5.7.0/hive-exec-1.1.0-cdh5.7.0.jar!/com/google/common/collect/Multimaps.class
jar:file:/D:/tools/maven/data/com/google/guava/guava/14.0.1/guava-14.0.1.jar!/com/google/common/collect/Multimaps.class
It was loaded from the following location:
file:/D:/tools/maven/data/org/apache/hive/hive-exec/1.1.0-cdh5.7.0/hive-exec-1.1.0-cdh5.7.0.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of com.google.common.collect.Multimaps
解决思路
刚开始看到single出现在错误信息里面同时也在百度上查了下大部分资料,结论都是排除goole.comm依赖包,结果显然是不行的。
当时也怪我没有认真的去看错误信息,其实已经很明显了(istMultimap;)Ljava/util/Map; but it does not exist. Its class, com.google.common.collect.Multimaps,)这句话已经说明了找不到方法了,hive-exec里面用的guava包下面没有Multimaps方法,最后发现是版本的问题,加入以下问题解决