项目启动报错:

Connected to the target VM, address: '127.0.0.1:59412', transport: 'socket'
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/document/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.10.0/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/document/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Exception in thread "main" java.lang.StackOverflowError

解决方案:

直接看报错内容,可以看出  是log4j和logback-classic的jar包冲突。

最简单的解决方法:将最新添加的jar包依赖,依次删除,然后启动服务,查看是因为多增加了哪个jar包依赖之后,出现的jar包冲突问题。

找到之后,在pom.xml中排除掉即可:

<!-- zipkin服务端 -->
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-server</artifactId>
<version>2.10.1</version>
<!--排除-->
<exclusions>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</exclusion>
</exclusions>
</dependency>

当然,排除的过程也可能依旧报错,那你得看看是你新加的这个jar包里面是多依赖了报错的jar包里的哪一个。

注意也可能是

   <!--排除-->
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>

注意:

<groupId>对应上方错误中的红色
<artifactId>对应上方错误中的蓝色

spring cloud启动zipkin,报错maven依赖jar包冲突 Class path contains multiple SLF4J bindings的更多相关文章

  1. 【maven】排除maven中jar包依赖的解决过程 例子:spring cloud启动zipkin,报错maven依赖jar包冲突 Class path contains multiple SLF4J bindings.

    一直对于maven中解决jar包依赖问题的解决方法纠结不清: 下面这个例子可以说明一个很简单的解决方法: 项目启动报错: Connected to the target VM, address: '1 ...

  2. Maven:maven依赖jar包冲突处理

    Maven多模块项目中偶尔会遇到这种问题:明明项目中相关的jar包已经通过pom.xml引进来了,还是报错找到不到相关的类的错误.这种时候,基本上可以断定是jar包冲突的问题. 很多情况下jar包会通 ...

  3. 解决Maven依赖jar包冲突总结

    maven导入jar包中的一些概念:      直接依赖:项目中直接导入的jar包,就是该项目的直接依赖包.      传递依赖:项目中没有直接导入的jar包,可以通过项目直接依赖jar包传递到项目中 ...

  4. 【spring cloud】spring cloud集成zipkin报错:Prometheus requires that all meters with the same name have the same set of tag keys.

    spring boot 2.0.X 的版本,整合zipkin2.10.1 zipkin服务启动后,访问zipkin的UI http://localhost:8002/zipkin/ 页面显示空白,cs ...

  5. 【spring cloud】【IDEA】【Maven】spring cloud多模块打包,打包的jar包只有几k,jar包无法运行,运行报错:no main manifest attribute, in /ms-eureka.jar

    ======================================================================================== 引申:maven打包多 ...

  6. maven项目启动报错:SLF4J: Class path contains multiple SLF4J bindings.

    SringBoot的Application启动报错: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding ...

  7. spring boot 启动遇到报错:Failed to configure a DataSource

    spring  boot 启动遇到报错,具体如下 Description: Failed to configure a DataSource: 'url' attribute is not speci ...

  8. maven项目报错:Class path contains multiple SLF4J bindings

    maven项目编译不报错,运行时报错如下: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [b ...

  9. 日志框架整合报错Class path contains multiple SLF4J bindings.

    在进行SSM框架的日志框架统一管理时,报错Class path contains multiple SLF4J bindings 如下图 意思是类路径下包含重复的SLF4J绑定,然后给出了重复的两个全 ...

随机推荐

  1. Python连载50-贪婪匹配、XPath介绍

    一.贪婪和非贪婪 1.贪婪:尽可能多的匹配,(*)表示贪婪匹配 2.非贪婪:找到符合条件的最小内容即可,(?)表示非贪婪 3.正则默认使用贪婪匹配 import re title = u"& ...

  2. 简单探讨一下.NET Core 3.0使用AspectCore的新姿势

    前言 这几天在对EasyCaching做支持.net core 3.0的调整.期间遇到下面这个错误. System.NotSupportedException:"ConfigureServi ...

  3. laravel中select2多选,初始化默认选中项

    项目中有发送消息功能,需要能通过搜索,多选用户,来指定发送人.使用 select2 插件来完成. select2 的 html 代码如下: <div class="form-group ...

  4. 英语阅读——Love and logic:The story of a fallacy

    这篇文章是<新视野大学英语>第四册的第一单元的文章,读着挺有趣,便拿过来分享一下. 1 I had my first date with Polly after I made the tr ...

  5. \" 转义字符, \a系统警报,逐字字符串(verbatim string)

    string str="The key factors are \"focus\" and \"perseverance\""; strin ...

  6. 关于spring,IOC和AOP的解析原理和举例

    引用自:https://blog.csdn.net/paincupid/article/details/43152397 IOC:就是DAO接口的实现不再是业务逻辑层调用工厂类去获取,而是通过容器(比 ...

  7. Vuex基本使用的总结--转载

    在 Vue 的单页面应用中使用,需要使用Vue.use(Vuex)调用插件.使用非常简单,只需要将其注入到Vue根实例中. import Vuex from 'vuex' Vue.use(Vuex) ...

  8. 干货,Wireshark使用技巧-过滤规则

    - 过滤规则使用 在抓取报文时使用的规则,称为过滤规则,Wireshark底层是基于Winpcap,因此过滤规则是Winpcap定义的规则,设置过滤规则后,抓到的报文仅包含符合规则的报文,其它报文则被 ...

  9. 打开Visual Studio 2017报错:未能正确加载“VSTS for Database Professionals Sql Server Data-tier Application”包

    出现如下错误 解决办法 > cmd > regsvr32 %windir%\system32\jscript.dll

  10. Python用python-docx读写word文档

    python-docx库可用于创建和编辑Microsoft Word(.docx)文件.官方文档:https://python-docx.readthedocs.io/en/latest/index. ...