oksice 2021-10-18 10:27 采纳率: 80%
浏览 12
已结题

这个tomcat启动的jar包冲突怎么前后写了两组不一样的日志jar冲突?

提示Found binding in: slf4j-log4j12、logback-classic两个jar包,下面又写Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path,那是slf4j-log4j12、logback-classic冲突还是log4j-over-slf4j、slf4j-log4j12冲突,应该怎么理解的呢?
报错内容如下:

2021-10-17 15:02:07   17-Oct-2021 15:02:07.933 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2021-10-17 15:02:08   SLF4J: Class path contains multiple SLF4J bindings.
2021-10-17 15:02:08   SLF4J: Found binding in [jar:file:/usr/local/tomcat/webapps/chnl-base-service/WEB-INF/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
2021-10-17 15:02:08   SLF4J: Found binding in [jar:file:/usr/local/tomcat/webapps/chnl-base-service/WEB-INF/lib/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
2021-10-17 15:02:08   SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
2021-10-17 15:02:08   SLF4J: Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path, preempting StackOverflowError. 
2021-10-17 15:02:08   SLF4J: See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details.
2021-10-17 15:02:08   17-Oct-2021 15:02:08.103 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
2021-10-17 15:02:08       org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/chnl-base-service]]
2021-10-17 15:02:08           at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
2021-10-17 15:02:08           at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
2021-10-17 15:02:08           at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
2021-10-17 15:02:08           at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
2021-10-17 15:02:08           at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
2021-10-17 15:02:08           at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:970)
2021-10-17 15:02:08           at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1840)
2021-10-17 15:02:08           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
2021-10-17 15:02:08           at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2021-10-17 15:02:08           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2021-10-17 15:02:08           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2021-10-17 15:02:08           at java.lang.Thread.run(Thread.java:748)
2021-10-17 15:02:08       Caused by: java.lang.ExceptionInInitializerError
2021-10-17 15:02:08           at org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:72)
2021-10-17 15:02:08           at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:45)
2021-10-17 15:02:08           at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129)
2021-10-17 15:02:08           at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108)
2021-10-17 15:02:08           at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302)
2021-10-17 15:02:08           at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:276)
2021-10-17 15:02:08           at org.apache.commons.logging.LogAdapter$Slf4jAdapter.createLocationAwareLog(LogAdapter.java:130)
2021-10-17 15:02:08           at org.apache.commons.logging.LogAdapter.createLog(LogAdapter.java:91)
2021-10-17 15:02:08           at org.apache.commons.logging.LogFactoryService.getInstance(LogFactoryService.java:46)
2021-10-17 15:02:08           at org.apache.commons.logging.LogFactoryService.getInstance(LogFactoryService.java:41)
2021-10-17 15:02:08           at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:655)
2021-10-17 15:02:08           at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:90)
2021-10-17 15:02:08           at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172)
2021-10-17 15:02:08           at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5152)
2021-10-17 15:02:08           at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
2021-10-17 15:02:08           ... 10 more
2021-10-17 15:02:08       Caused by: java.lang.IllegalStateException: Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path, preempting StackOverflowError. See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details.
2021-10-17 15:02:08           at org.slf4j.impl.Log4jLoggerFactory.<clinit>(Log4jLoggerFactory.java:54)
2021-10-17 15:02:08           ... 25 more
2021-10-17 15:02:08   17-Oct-2021 15:02:08.104 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/usr/local/tomcat/webapps/chnl-base-service.war]
2021-10-17 15:02:08       java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/chnl-base-service]]
2021-10-17 15:02:08           at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:747)
2021-10-17 15:02:08           at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
2021-10-17 15:02:08           at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
2021-10-17 15:02:08           at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:970)
2021-10-17 15:02:08           at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1840)
2021-10-17 15:02:08           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
2021-10-17 15:02:08           at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2021-10-17 15:02:08           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2021-10-17 15:02:08           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2021-10-17 15:02:08           at java.lang.Thread.run(Thread.java:748)
2021-10-17 15:02:08   17-Oct-2021 15:02:08.105 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/usr/local/tomcat/webapps/chnl-base-service.war] has finished in [11,325] ms
2021-10-17 15:02:08   17-Oct-2021 15:02:08.109 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
2021-10-17 15:02:08   17-Oct-2021 15:02:08.119 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 11406 ms



  • 写回答

1条回答 默认 最新

  • 离人散 2021-10-18 10:45
    关注

    这个解决思路你可以试试。https://www.cnblogs.com/xmg520/p/11466788.html

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 12月14日
  • 已采纳回答 12月6日
  • 创建了问题 10月18日

悬赏问题

  • ¥15 12864只亮屏 不显示汉字
  • ¥20 三极管1000倍放大电路
  • ¥15 vscode报错如何解决
  • ¥15 前端vue CryptoJS Aes CBC加密后端java解密
  • ¥15 python随机森林对两个excel表格读取,shap报错
  • ¥15 基于STM32心率血氧监测(OLED显示)相关代码运行成功后烧录成功OLED显示屏不显示的原因是什么
  • ¥100 X轴为分离变量(因子变量),如何控制X轴每个分类变量的长度。
  • ¥30 求给定范围的全体素数p的(p-2)/p的连乘积值
  • ¥15 VFP如何使用阿里TTS实现文字转语音?
  • ¥100 需要跳转番茄畅听app的adb命令