spring boot 集成hadoop datax 启动报 hive-exec-1.1.1.jar!/com/google/common/collect/Multimaps.class

记录下问题和解决方式,以便以后查阅。

异常信息

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:/Users/baichao/.m2/repository/org/apache/hive/hive-exec/1.1.1/hive-exec-1.1.1.jar!/com/google/common/collect/Multimaps.class
    jar:file:/Users/baichao/.m2/repository/com/google/guava/guava/20.0/guava-20.0.jar!/com/google/common/collect/Multimaps.class

The class hierarchy was loaded from the following locations:

    com.google.common.collect.Multimaps: file:/Users/baichao/.m2/repository/org/apache/hive/hive-exec/1.1.1/hive-exec-1.1.1.jar

可以看到,报错原因是 /com/google/common/collect/Multimaps.class 类在多个依赖包中都有

 

不知道为啥hive-exec包下也会有这个代码,感觉像是复制使用的,正常上图导入的方法应该来自于 com.google.guava ,但是却指向了hive-exec,这种情况没法使用maven依赖排除,除非排除掉整个hive-exec包,解决方式也很简单,我们只需要在当前项目pom内再次手动声明下 com.google.guava 包即可

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>20.0</version>
        </dependency>

问题解决。

结束

最后给vue开发的小伙伴推荐一款表单设计器:JForm表单设计器

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值