排错!springboot项目,启动报An attempt was made to call the method com.google.common.collect.Multimaps.asMap


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方法,最后发现是版本的问题,加入以下问题解决

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值