相关疑难解决方法(0)

多个SLF4J绑定与activemq-all-5.6.0.jar出错

当我升级到activemq-all-5.6.0时

我在服务器启动时遇到此错误

SLF4J:类路径包含多个SLF4J绑定

使用activemq-all-5.5.1时我没有这个问题

在检查时,我发现在activemq-all-5.6.0.jar和slf4j-log4j12-1.5.10.jar中都存在StaticLoggerBinder.class,这导致了问题

请帮忙调试此问题

我的pom.xml如下

<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.5.10</version>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>jcl-over-slf4j</artifactId>
    <version>1.5.10</version>
    <scope>runtime</scope>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>1.5.10</version>
    <scope>runtime</scope>
</dependency>
Run Code Online (Sandbox Code Playgroud)

活动的mq依赖是这样的

旧版本5.5.1(此作品)

<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-all</artifactId>
    <version>5.5.1</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

新版本5.6.0(这给出了错误)

<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-all</artifactId>
    <version>5.6.0</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

提前致谢.

activemq-classic slf4j maven

26
推荐指数
2
解决办法
1万
查看次数

标签 统计

activemq-classic ×1

maven ×1

slf4j ×1