【发布时间】:2017-02-08 23:03:26
【问题描述】:
amqps(RabbitMQ client) jar 需要包含 slf4j-log4j12 的实现,否则它将在他的日志中抛出NoSuchMethodError。所以,我将它添加到pom.xml。现在日志在 jboss 5.1 中被搞砸了,所有应用程序日志现在都记录在 console/server.log 文件中。
我们对位于 DOMAIN/log 文件夹中的所有应用程序使用 jboss 默认日志记录。
jar 不包含在应用中时出错
Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder;
POM
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.21</version>
</dependency>
【问题讨论】: