在搭建Zipkin Server时出现Exception in thread “main” java.lang.StackOverflowError

错误信息:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/%e5%b0%8f%e4%be%af/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.11.1/log4j-slf4j-impl-2.11.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/%e5%b0%8f%e4%be%af/.m2/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]

这个说的是依赖冲突了,于是我把

logback-classic这个依赖排除了,虽然以上错误信息没有了,但是出现了

Exception in thread “main” java.lang.StackOverflowError

于是我又在另一篇博客中发现需要在zipkin-server中排除log4j2

通过在pom中排除log4j2,问题解决

        <!-- zipkin-server -->
        <dependency>
            <groupId>io.zipkin.java</groupId>
            <artifactId>zipkin-server</artifactId>
            <version>2.12.3</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-log4j2</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

运行成功如下图所示,可以访问页面了

                                    ********
                                  **        **
                                 *            *
                                **            **
                                **            **
                                 **          **
                                  **        **
                                    ********
                                      ****
                                      ****
        ****                          ****
     ******                           ****                                 ***
  ****************************************************************************
    *******                           ****                                 ***
        ****                          ****
                                       **
                                       **


             *****      **     *****     ** **       **     **   **
               **       **     **  *     ***         **     **** **
              **        **     *****     ****        **     **  ***
             ******     **     **        **  **      **     **   **

:: Powered by Spring Boot ::         (v2.1.2.RELEASE)

2023-05-09 16:55:23.713  INFO 13132 --- [           main] c.SpringCloud01ServiceZipkinApplication  : Starting SpringCloud01ServiceZipkinApplication on DESKTOP-382SV80 with PID 13132 (H:\SpringCloud\Netflix\SpringCloud01-service-zipkin\target\classes started by 小侯 in H:\SpringCloud\Netflix)
2023-05-09 16:55:23.713  INFO 13132 --- [           main] c.SpringCloud01ServiceZipkinApplication  : No active profile set, falling back to default profiles: default
2023-05-09 16:55:25.854  INFO 13132 --- [           main] io.undertow.servlet                      : Initializing Spring embedded WebApplicationContext
2023-05-09 16:55:25.854  INFO 13132 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2094 ms
2023-05-09 16:55:26.073  INFO 13132 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2023-05-09 16:55:26.214  INFO 13132 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
2023-05-09 16:55:26.261  INFO 13132 --- [           main] org.xnio                                 : XNIO version 3.7.0.Final
2023-05-09 16:55:26.261  INFO 13132 --- [           main] org.xnio.nio                             : XNIO NIO Implementation Version 3.7.0.Final
2023-05-09 16:55:26.277  INFO 13132 --- [           main] org.jboss.threads                        : JBoss Threads version 2.3.2.Final
2023-05-09 16:55:26.323  INFO 13132 --- [           main] o.s.b.w.e.u.UndertowServletWebServer     : Undertow started on port(s) 9410 (http) with context path ''
2023-05-09 16:55:26.323  INFO 13132 --- [           main] c.SpringCloud01ServiceZipkinApplication  : Started SpringCloud01ServiceZipkinApplication in 2.939 seconds (JVM running for 3.806)
2023-05-09 16:55:26.766  INFO 13132 --- [)-] io.undertow.servlet                      : Initializing Spring DispatcherServlet 'dispatcherServlet'
2023-05-09 16:55:26.766  INFO 13132 --- [)-] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2023-05-09 16:55:26.766  INFO 13132 --- [)-] o.s.web.servlet.DispatcherServlet        : Completed initialization in 0 ms
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值