相关疑难解决方法(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万
查看次数

slf4j警告有关相同的绑定是重复的

SLF4J抱怨多个绑定,但看起来完全一样:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [zip:C:/bea_domains/my_service_domain/servers/AdminServer/tmp/_WL_user/my-shared-app-lib/obaz3z/APP-INF/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [zip:C:/bea_domains/my_service_domain/servers/AdminServer/tmp/_WL_user/my-shared-app-lib/obaz3z/APP-INF/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Run Code Online (Sandbox Code Playgroud)

有没有办法摆脱这个警告?可能是什么原因呢?

java logging weblogic slf4j

4
推荐指数
1
解决办法
2560
查看次数

标签 统计

slf4j ×2

activemq-classic ×1

java ×1

logging ×1

maven ×1

weblogic ×1