找回密码
 会员注册
查看: 32|回复: 0

LoggerFactoryisnotaLogbackLoggerContextbutLogbackisontheclasspath

[复制链接]

2万

主题

0

回帖

7万

积分

超级版主

积分
73548
发表于 2024-9-3 22:26:57 | 显示全部楼层 |阅读模式
完整的报错信息:Exceptioninthread"main"java.lang.IllegalArgumentExceptionoggerFactoryisnotaLogbackLoggerContextbutLogbackisontheclasspath.EitherremoveLogbackorthecompetingimplementation(classorg.slf4j.simple.SimpleLoggerFactoryloadedfromfile:/usr/local/apache-maven-3.9.3/repository/org/slf4j/slf4j-simple/2.0.13/slf4j-simple-2.0.13.jar).IfyouareusingWebLogicyouwillneedtoadd'org.slf4j'toprefer-application-packagesinWEB-INF/weblogic.xmlrg.slf4j.simple.SimpleLoggerFactory atorg.springframework.util.Assert.instanceCheckFailed(Assert.java:592) atorg.springframework.util.Assert.isInstanceOf(Assert.java:511) atorg.springframework.boot.logging.logback.LogbackLoggingSystem.getLoggerContext(LogbackLoggingSystem.java:396) atorg.springframework.boot.logging.logback.LogbackLoggingSystem.beforeInitialize(LogbackLoggingSystem.java:124) atorg.springframework.boot.context.logging.LoggingApplicationListener.onApplicationStartingEvent(LoggingApplicationListener.java:238) atorg.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:220) atorg.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:185) atorg.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:178) atorg.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:156) atorg.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138) atorg.springframework.boot.context.event.EventPublishingRunListener.multicastInitialEvent(EventPublishingRunListener.java:136) atorg.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:75) atorg.springframework.boot.SpringApplicationRunListeners.lambda$starting$0(SpringApplicationRunListeners.java:54) atjava.base/java.lang.Iterable.forEach(Iterable.java:75) atorg.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118) atorg.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:54) atorg.springframework.boot.SpringApplication.run(SpringApplication.java:327)123456789101112131415161718原因:引入dashscope-sdk-javajar包,新饮用的jar包中包含日志框架,与现在的日志框架冲突解决查看报错信息确定具体冲突的日志引用点击dashscope-sdk-java引用找到冲突的依赖,与报错日志对应排除依赖(exclusions标签),刷新maven依赖,重新打包,成功运行最终引入com.alibaba${com.alibaba-dashscope-sdk-java}org.slf4j123456789101112
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

QQ|手机版|心飞设计-版权所有:微度网络信息技术服务中心 ( 鲁ICP备17032091号-12 )|网站地图

GMT+8, 2025-1-13 07:48 , Processed in 0.484553 second(s), 26 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表