背景介绍

我用的springboot框架,是用maven构建的项目,加入swagger依赖的时候启动的时候报错

报错信息:


***************************
APPLICATION FAILED TO START
***************************Description:An attempt was made to call the method com.google.common.collect.FluentIterable.concat(Ljava/lang/Iterable;Ljava/lang/Iterable;)Lcom/google/common/collect/FluentIterable; but it does not exist. Its class, com.google.common.collect.FluentIterable, is available from the following locations:jar:file:/repository/com/google/guava/guava/19.0/guava-19.0.jar!/com/google/common/collect/FluentIterable.classIt was loaded from the following location:file:/repository/com/google/guava/guava/19.0/guava-19.0.jarAction:Correct the classpath of your application so that it contains a single, compatible version of com.google.common.collect.FluentIterableProcess finished with exit code 0

定位原因:

根据错误定位是jar包冲突,

1、执行maven命令查看项目jar包依赖关系

mvn dependency:tree >tree.log

2、依赖引用分析发现有多个地方引用了guava

--nacos-client

--swagger

解决方案:

在启动项目模块中pom.xml 指定guava版本,重新启动项目。

         <dependency><groupId>com.google.guava</groupId><artifactId>guava</artifactId><version>29.0-jre</version></dependency>

项目引入 swagger 启动报错处理(An attempt was made to call the method com.google.common.collect.FluentIterable)相关推荐

  1. eclipse运行maven项目,tomcat启动报错

    2019独角兽企业重金招聘Python工程师标准>>> 使用eclipse创建maven项目后,在pom.xml文件中添加依赖.若依赖包没有下载,eclipse会自行下载到maven ...

  2. SpringBoot 项目tomcat插件启动报错 java.lang.NoClassDefFoundError: javax/el/ELManager

    问题描述: SpringBoot项目 tomcat插件启动出现下面的问题: ERROR 2021-04-07 08:42:03,129 org.springframework.boot.SpringA ...

  3. vue项目引入微信sdk报错记录

    前言 vue项目引入微信sdk $ npm install weixin-js-sdk --save 运行报错如下: npm install weixin-js-sdk --save下载失败显示未配置 ...

  4. 报错:An attempt was made to call a method that does not exist. The attempt was made from the following

    今天在学习thymeleaf时,运行springboot报如下错误: "C:\Z cap\jdk8u91\bin\java.exe" -XX:TieredStopAtLevel=1 ...

  5. Springboot项目使用jdk17启动报错:module java.base does not “opens java.lang.invoke“

    解决方法: 启动参数增加 –add-opens java.base/java.lang.invoke=ALL-UNNAMED

  6. Vue2项目引入矢量图报错(显示□)

    常规来说,在assist文件夹下建立icon,并且把下载的文件包一股脑装进去,然后在main.js导入样式即可. 但是我尝试多次无论是 APP.VUE或者main.js 均无效. 回到public文件 ...

  7. Swagger启动报错Failed to start bean ‘documentationPluginsBootstrapper‘

    在配置类中加上: mvc:pathmatch:matching-strategy: ant_path_matcher

  8. arthas启动报错,找不到tools.jar,C:\Program Files (x86)\Common Files\Oracle\Java\javapath问题

    原因: 出现此问题是因为,Java自动更新后自动配置了path:C:\Program Files (x86)\Common Files\Oracle\Java\javapath.这导致我们配置的jdk ...

  9. 启动报错,找不到tools.jar,C:\Program Files (x86)\Common Files\Oracle\Java\javapath问题,java环境变量不生效

    出现此问题是因为,java自动更新后自动配置了path:C:\Program Files (x86)\Common Files\oracle\Java\javapath.这导致我们配置的jdk不被优先 ...

最新文章

  1. Swift、Flutter 共同瞄准 Windows!
  2. englishpod主持人对话文本_Englishpod 69 | 主持人文本讲解 | How Would You Like Your Eggs?...
  3. matlab氢原子杂化轨道,网络版原子和分子结构可视化程序的开发
  4. dateframe行列插入和删除操作
  5. windows内核情景分析---进程线程1
  6. Spring Boot入门(9)网页版计算器
  7. (24)FPGA减法器设计(第5天)
  8. MySQL安装与操作总结
  9. 实验5.4 编程实现两字符串的连接(使用string类定义字符串对象)
  10. 循环报数java代码_循环报数 Java实现
  11. vue(vue-cli+vue-router)+babel+webpack项目搭建入门(三)
  12. codeforces 735C Tennis Championship(贪心+递推)
  13. Direct2D教程(七)单色画刷
  14. [c#源码分享]TCP通信中的大文件传送
  15. SAS 方差分析(复习4)
  16. Python学习笔记-数据分析-Pandas02-Dataframe
  17. HADOOP读写性能测试
  18. android 网络运营商名称显示规则(锁屏界面,下拉列表)
  19. keil5编译器退出调试时卡死
  20. 计蒜客信息学入门赛 #16--C--最大区间包含问题--待完善

热门文章

  1. 系统设计的垂直拆分和分平拆分
  2. 不用ps,怎么批量调整图片尺寸大小?
  3. 阿里 面试那些二三事
  4. 中国移动又迈出一大步
  5. PROTEUS最新版本下载CSDN_倒带2021下载-倒带2021app下载v2.8.10最新版本
  6. q-flashplus怎么使用_QDI联想QFLASH BIOS刷新工具使用手册
  7. yolo系列外文翻译_Yolo系列其二:Yolo_v2
  8. Wireshark抓包分析结果中的LG bit和IG bit
  9. 区分旅客国籍.....
  10. 基于ESP32实现一个WIFI透传模块demo