In your case you would have to make sure the pax logging bunde has access to the jms api. So you would need to write a fragment for it.
An easier way is to use Apache Decanter with the jms appender. It is already well prepared for OSGi. See: https://karaf.apache.org/manual/decanter/latest-1/#_jms Christian 2017-11-25 9:39 GMT+01:00 eric56 <equefel...@laposte.net>: > Hi, > > I created this appender in my org.ops4j.pax.logging.cfg file: > *log4j.appender.JMS=org.apache.log4j.net.JMSAppender > log4j.appender.JMS.InitialContextFactoryName=org.apache.activemq.jndi. > ActiveMQInitialContextFactory > log4j.appender.JMS.ProviderURL=tcp://localhost:61616 > log4j.appender.JMS.TopicBindingName=logTopic > log4j.appender.JMS.TopicConnectionFactoryBindingName=ConnectionFactory > log4j.appender.JMS.Threshold=ERROR* > > I get this error message is: > *Unexpected problem updating configuration org.ops4j.pax.logging > java.lang.NoClassDefFoundError: javax/jms/JMSException* > > I installed this additionnal bundle: > *bundle:install mvn:javax.jms/javax.jms-api/2.0.1* > > But it didn't help... > > Currently I have this bundle installed: > *162 | Active | 50 | 2.16.3 | camel-jms > 279 | Active | 80 | 4.0.5 | Apache Karaf :: JMS :: Core > 280 | Active | 80 | 2.0.1 | JMS API > * > And these features: > *karaf@trun()> feature:list | grep -i JMS > cxf-transports-jms | 3.1.5 | > | > Started | cxf-3.1.5 | > spring-jms | 3.2.14.RELEASE_1 | > | > Started | spring-4.0.5 | Spring 3.2.x JMS > support > camel-jms | 2.16.3 | x > | > Started | camel-2.16.3 | > jms | 4.0.5 | x > | > Started | enterprise-4.0.5 | JMS service and > commands* > > Could you help me ? > > Regards. > > Eric > > > > -- > Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html > -- -- Christian Schneider http://www.liquid-reality.de <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de> Computer Scientist http://www.adobe.com