Quantcast

Invoking custom appenders from PAX Logging

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Invoking custom appenders from PAX Logging

amollin
Hello there,

I've to enable JMS Queue Appender in Log4J in servicemix.  I found an implementation of JMS Queue Appender in Logback and would like to configure that in Log4J.

I followed the instructions mentioned under "Using your own appenders" section of http://karaf.apache.org/manual/2.2.6/users-guide/logging-system.html.

I modified MANIFEST.MF of logback-classic.jar to include the Bundle-SymbolicName: and Fragment-Host: as well.

However, I get the following exception when during karaf startup.  

-bash-4.1$ ./karaf
log4j:ERROR Could not instantiate class [ch.qos.logback.classic.net.JMSQueueAppender].
java.lang.ClassNotFoundException: ch.qos.logback.classic.net.JMSQueueAppender not found by org.ops4j.pax.logging.pax-logging-service [3]
        at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
        at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
        at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at org.apache.log4j.helpers.Loader.loadClass(Loader.java:198)
        at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:326)
        at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:123)
        at org.apache.log4j.PaxLoggingConfigurator.parseAppender(PaxLoggingConfigurator.java:81)
        at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
        at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
        at org.apache.log4j.PaxLoggingConfigurator.doConfigure(PaxLoggingConfigurator.java:57)
        at org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl.updated(PaxLoggingServiceImpl.java:187)
        at org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl$1ManagedPaxLoggingService.updated(PaxLoggingServiceImpl.java:321)
        at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1490)
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:104)
        at java.lang.Thread.run(Thread.java:662)
log4j:ERROR Could not instantiate appender named "jms".

Please advise.

Thanks,
Ashok
Loading...