简体   繁体   English

ActiveMQ 客户端的问题:ClassNotFoundException org.apache.logging.log4j.spi.AbstractLoggerAdapter

[英]Issues with ActiveMQ client: ClassNotFoundException org.apache.logging.log4j.spi.AbstractLoggerAdapter

I have a small ActiveMQ client that is supposed to just connect to the AMQ service, create a queue, and send out a message.我有一个小的 ActiveMQ 客户端,它应该只是连接到 AMQ 服务,创建一个队列,然后发送一条消息。 I am getting the following error message:我收到以下错误消息:

Failed to instantiate SLF4J LoggerFactory
Reported exception:
java.lang.NoClassDefFoundError: org/apache/logging/log4j/spi/AbstractLoggerAdapter
  at java.lang.ClassLoader.defineClassl(Native Method)
  ...

The following jars are on my classpath :以下 jars 在我的classpath

log4j-1.2-api-2.6.2.jar
log4j-core-2.6.2.jar
log4j-slf4j-impl-2.6.2.jar

activemq-broker-5.13.3.jar
activemq-client-5.13.3.jar
activemq-console-5.13.3.jar
activemq-jaas-5.13.3.jar
activemq-kahadb-store-5.13.3.jar
activemq-openwire-legacy-5.13.3.jar
activemq-protobuf-1.1.jar
activemq-spring-5.13.3.jar
activemq-web-5.13.3.jar
geronimo-j2ee-management_1.1_spec-1.0.1.jar
geronimo-jms_1.1_spec-1.1.1.jar
geronimo-jta_1.0.1B_spec-1.0.1.jar
hawtbuf-1.11.jar
jcl-over-slf4j-1.7.13.jar
slf4j-api-1.7.13.jar

If I take away the top three libraries I get the error Failed to load class “org.slf4j.impl.StaticLoggerBinder”如果我拿走前三个库,我会收到错误Failed to load class “org.slf4j.impl.StaticLoggerBinder”

I've tried searching but I can't say that I've found anything that has worked so far.我试过搜索,但我不能说我已经找到了迄今为​​止有效的任何东西。

您需要将 log4j-api-2.6.2.jar 添加到您的类路径中。

I had exactly the same error.我有完全相同的错误。 I replaced org.apache.logging.log4j:log4j-slf4j-impl:2.12.1 to org.slf4j:slf4j-simple:2.0.0-alpha1 .我将org.apache.logging.log4j:log4j-slf4j-impl:2.12.1替换为org.slf4j:slf4j-simple:2.0.0-alpha1 It helped me.它帮助了我。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ClassNotFoundException: org.apache.log4j.Priority - ClassNotFoundException: org.apache.log4j.Priority ClassNotFoundException: org.apache.log4j.Logger - ClassNotFoundException: org.apache.log4j.Logger 升级到面临异常的Log4J2。 [Java.lang.ClassNotFoundException:org.apache.logging.log4j.LogManager] - Upgrading to Log4J2 facing exception. [Java.lang.ClassNotFoundException: org.apache.logging.log4j.LogManager] java.lang.ClassNotFoundException:将 log4j 1.2.17 更新到 2.13.0 后的 org.apache.logging.log4j.Logger - java.lang.ClassNotFoundException: org.apache.logging.log4j.Logger after updating log4j 1.2.17 to 2.13.0 org.apache.logging.log4j.core.Logger 与 org.apache.logging.log4j.Logger - org.apache.logging.log4j.core.Logger vs org.apache.logging.log4j.Logger 减少使用log4j2时来自org.apache.http.client的日志记录噪音 - Reduce the logging noise from org.apache.http.client when using log4j2 java.lang.ClassNotFoundException:org.apache.log4j.Level - java.lang.ClassNotFoundException: org.apache.log4j.Level java.lang.ClassNotFoundException: org.apache.log4j.Logger - java.lang.ClassNotFoundException: org.apache.log4j.Logger IntelliJ无法使用ClassNotFoundException进行编译:org.apache.log4j.Priority - IntelliJ fails to compile with ClassNotFoundException: org.apache.log4j.Priority 错误:org.apache.logging.log4j.Logger.atDebug()Lorg/apache/logging/log4j/LogBuilder - ERROR: org.apache.logging.log4j.Logger.atDebug()Lorg/apache/logging/log4j/LogBuilder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM