Skip to Content

ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder (ActiveMQ 5.5.1)

Dear PI community,

Setting up a JMS-based configuration scenario in PI 7.3 where Apache ActiveMQ 5.5.1 was used as a JMS broker, I faced the following exception in JMS sender communication channel:

[EXCEPTION]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.sap.aii.adapter.jms.core.common.InvokeUtils.invoke(InvokeUtils.java:295)
at com.sap.aii.adapter.jms.core.common.InvokeUtils.invoke(InvokeUtils.java:266)
at com.sap.aii.adapter.jms.core.connector.DirectConnectorImpl.createConnectionFactory(DirectConnectorImpl.java:97)
at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.doConnect(ConnectorImpl.java:379)
at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.connectIfDisconnected(ConnectorImpl.java:218)
at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.connect(ConnectorImpl.java:195)
at com.sap.aii.adapter.jms.core.channel.ChannelImpl.doStart(ChannelImpl.java:288)
at com.sap.aii.adapter.jms.core.channel.ChannelImpl.start(ChannelImpl.java:168)
at com.sap.aii.adapter.jms.core.channel.AdapterImpl$1.run(AdapterImpl.java:862)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:185)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:302)
Caused by: java.lang.NoClassDefFoundError: org/apache/activemq/ActiveMQPrefetchPolicy : cannot initialize class because prior initialization attempt failed
at org.apache.activemq.ActiveMQConnectionFactory.<init>(ActiveMQConnectionFactory.java:88)
at org.apache.activemq.ActiveMQConnectionFactory.<init>(ActiveMQConnectionFactory.java:131)
... 17 more
Caused by: java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:230)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:112)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:275)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:248)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:261)
at org.apache.activemq.ActiveMQPrefetchPolicy.<clinit>(ActiveMQPrefetchPolicy.java:38)
... 19 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder

Looking for the solution of the problem, I found the recommendation on SLF4J speaking about missing binding:

http://www.slf4j.org/codes.html#StaticLoggerBinder

Did anyone come across similar issue and how did you resolve it? Did you have to change bindings in deployed ActiveMQ library or did you use a different approach?

Regards,

Vadim

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 17, 2012 at 10:49 AM

    Hi,

    1. please list the libraries you've added to the driver file

    2. I'm running activemq 4.5.3 with 7.3 without any issues so there should be no issues with 5.5 too I guess (but it's based on a new java so who knows) 😊

    Regards,

    Michal Krawczyk

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Vadim Klimov

      Hi Vadim,

      My provider.xml looks exactly like you and i was able to overcome the slf4j error but i am still getting the target invocation error. Can you please let me know what are the JMS adapter additional parameters details in the channel?

      The default trace doesn't have slf4j error but still getting the error as below. any help would be appreciated.

      A channel error occurred. Detailed error (if any) : com.sap.aii.adapter.jms.api.connector.ConnectorException: Cannot construct connection factory using constructor: ConstructorInvocationException: Error executing constructor invocation: <br>{ConstructorInvocation<br>{className=org.apache.activemq.ActiveMQConnectionFactory,<br>invokeParams=[<br>{InvokeParameter<br>{className=null,<br>type=java.lang.String,<br>value=tcp://XX.XXX.XX.XX:61616<br>}]<br>}: java.lang.reflect.InvocationTargetException at com.sap.aii.adapter.jms.core.connector.DirectConnectorImpl.createConnectionFactory(DirectConnectorImpl.java:101) <br>

      Thanks,

      Srini