启动springboot时报错 APPLICATION FAILED TO START 包冲突

这篇具有很好参考价值的文章主要介绍了启动springboot时报错 APPLICATION FAILED TO START 包冲突。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

启动springboot时报错 APPLICATION FAILED TO START 包冲突

problem

具体日志如下

***************************
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:

    org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.registerWellKnownModulesIfAvailable(Jackson2ObjectMapperBuilder.java:823)

The following method did not exist:

    com.fasterxml.jackson.databind.Module.getTypeId()Ljava/lang/Object;

The calling method's class, org.springframework.http.converter.json.Jackson2ObjectMapperBuilder, was loaded from the following location:

    jar:file:/Users/dream/.m2/repository/org/springframework/spring-web/5.3.13/spring-web-5.3.13.jar!/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.class

The called method's class, com.fasterxml.jackson.databind.Module, is available from the following locations:

    jar:file:/Users/dream/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.3.3/jackson-databind-2.3.3.jar!/com/fasterxml/jackson/databind/Module.class

The called method's class hierarchy was loaded from the following locations:

    com.fasterxml.jackson.databind.Module: file:/Users/dream/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.3.3/jackson-databind-2.3.3.jar


Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.http.converter.json.Jackson2ObjectMapperBuilder and com.fasterxml.jackson.databind.Module


Process finished with exit code 1

reason

报错日志的意思

  • com.fasterxml.jackson.databind.Module.getTypeId 这个方法不存在
  • 此方法对应的一个类 json.Jackson2ObjectMapperBuilder 来自 spring-web-5.3.13.jar 包
  • 此方法对应的另一个类 jackson.databind.Module 来自 jackson-databind-2.3.3.jar

观察maven依赖

  • 正常项目的依赖是 spring-web-5.3.13.jar 和 jackson-databind-2.13.0.jar
  • 异常项目的依赖是 spring-web-5.3.13.jar 和 jackson-databind-2.3.3.jar
  • 可以看到是 第二个包的版本低了,导致出现了包冲突

对比pom文件

  • 对比正常和异常项目,发现正常项目 springboot 依赖是来自parent节点
  • 异常项目 springboot 依赖是pom中 自定义

启动springboot时报错 APPLICATION FAILED TO START 包冲突,pits,spring boot,后端,java

solution

采用parent方式引入springboot可以解决问题

启动springboot时报错 APPLICATION FAILED TO START 包冲突,pits,spring boot,后端,java文章来源地址https://www.toymoban.com/news/detail-774989.html

到了这里,关于启动springboot时报错 APPLICATION FAILED TO START 包冲突的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包赞助服务器费用

相关文章

  • This application failed to start because no Qt platform plugin could be initialized报错

    This application failed to start because no Qt platform plugin could be initialized报错

    开机后电脑一直跳出这个页面,每隔几分钟就跳出,影响电脑的使用。 由于本机近几天并未下载软件、移动文件位置等操作,只有下载安装Anaconda,于是我将这个原因归结于Anaconda安装上。为了学习opencv我下载了opencv-python的主模块包和PyQt5。 由于我经验不足,学习了在CSDN上大

    2024年02月02日
    浏览(14)
  • 问题:This application failed to start because no Qt platform plugin could be initialized. Reinstalling

    问题:This application failed to start because no Qt platform plugin could be initialized. Reinstalling

    例如: 从\\\"C:UsersAdministratorAppDataLocalProgramsPythonPython311Libsite-packages\\\"把“PyQt5”文件夹、“pyqt5_plugins”文件夹复制到\\\"C:UsersAdministratorAppDataLocalProgramsPythonPython311Lib\\\"下。

    2024年02月11日
    浏览(12)
  • 解决QT This application failed to start because no Qt platform plugin could be initialized. 问题

    解决QT This application failed to start because no Qt platform plugin could be initialized. 问题

    This application failed to start because no Qt platform plugin could beinitialized. Reinstalling the application may fix this problem. 遇到了这个问题,卡了蛮久的,也在网上找了很多方法,终于解决了!下面是我自己解决这个问题的过程,希望能够有参考价值,也是对自己解决这一过程的一点记录: 方法

    2024年01月16日
    浏览(13)
  • this application failed to start because no qt platform plugin could be initialized reinstalling the

    this application failed to start because no qt platform plugin could be initialized reinstalling the

    通过chat-GPT检索可以得到 这个错误通常是由于缺少Qt平台插件导致的。要解决这个问题,可以尝试以下方法: 1. 确保你已经正确安装了Qt平台插件。如果你使用的是conda或pip安装的Python,可以尝试重新安装PyQt或PySide。 2. 如果重新安装PyQt或PySide后仍然无法启动应用程序,你可以

    2024年02月15日
    浏览(10)
  • Zookeeper启动失败:FAILED TO START解决方案

    Zookeeper启动失败:FAILED TO START解决方案

     如图,启动zookeeper失败,输入 查看失败原因  Invalid config,我得知是配置文件出了问题,但是检查配置文件没有发现错误 最终在配置文件末尾配置参数结尾发现了未删除的空格  将三个节点配置文件中的空格删去之后,zookeeper均能正常运行 至此问题解决,投身下一个问题中

    2024年02月12日
    浏览(12)
  • 解决使用PyQt5出现错误This application failed to start because no Qt platform plugin could be initialized

    解决使用PyQt5出现错误This application failed to start because no Qt platform plugin could be initialized

    目录 背景介绍: 解决思路: 版本问题: 检查版本:首先要确定安装版本问题。确定你安装的PyQt5版本支持你下载的python的版本。 降python版本: 下载PyQt5 plugins缺少dll文件问题 环境变量问题 我这个学期开始上图形学,写上机作业第一次用到PyQt5写GUI,写了简单的代码测试工具

    2024年02月11日
    浏览(12)
  • zookeeper启动时Starting zookeeper ... FAILED TO START问题处理

    zookeeper启动时Starting zookeeper ... FAILED TO START问题处理

    Linux服务器中启动zookeeper服务时,出现 Starting zookeeper ... FAILED TO START 错误 通过分析zookeeper启动日志发现 启动zookeeper失败提示8080端口被占用,这是zookeeper3.5的特性 Zookeeper AdminServer,默认使用8080端口 修改zoo.cfg文件的配置,添加如下配置 修改后再次启动zookeeper,查看启动日志

    2024年02月06日
    浏览(14)
  • 解决mysql启动时的Failed to start LSB: start and stop MySQL问题

    解决mysql启动时的Failed to start LSB: start and stop MySQL问题

    前言: 在下载glibc版本的Mysql时,启动mysql服务时出现了如下错误 网上搜了许多种方法:查看错误日志,或者df -h查看磁盘是否已满等都未解决,后来尝试了重新对数据库进行初始化后才解决了该问题.  数据库初始化: 在对数据库重新进行初始化之前,需要事先删除 /usr/loc

    2024年02月07日
    浏览(13)
  • SSH无法启动错误解决:Failed to start OpenSSH server daemon.

    废话不说,先把方案直接贴出来赶紧试试: 直接执行一下的三个命令 这个问题是因为自己在玩的时候一不小心把var目录的权限给改了,导致如此。害我紧张的排查了好一会,大意了大意了。。。

    2024年02月11日
    浏览(20)
  • VSCode使用Remote-SSH连接服务器时报错:Resolver error: Error: The VS Code Server failed to start

    VSCode使用Remote-SSH连接服务器时报错:Resolver error: Error: The VS Code Server failed to start

    电脑关机打开后,使用VSCode连接服务器,在输入完密码之后右下角一直没有加载完毕,一直报: 无法安装VS Code服务器 Windows终端可以ssh到服务器上;VSCode连接时报错,之前连接过。 前期准备 :在做后边的操作之前一定要记得 关闭远程 ,报错的时候会弹出弹窗或者按 ESC ,选

    2024年02月05日
    浏览(12)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包