karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mnki <jobs.mohan...@gmail.com>
Subject Getting classcast exception when using Pax Logging with logback in karaf
Date Tue, 18 Aug 2015 15:50:44 GMT
Karaf version:3.0.3

I am using karaf and so in the startup.properties I commented out the
pax-logging-service and added the pax-logging-logback bundle.

Then in the org.ops4j.pax.logging.cfg file added the entry
        
org.ops4j.pax.logging.logback.config.file=${karaf.home}/etc/logback.xml

Installed logback-classic-1.0.13.jar and logback-core-1.0.13.jar bundles
using features.

Now in the bundle that is using logback logging statements added the logback
packages in the import-package section.

ch.qos.logback.classic;resolution:=optional,
							ch.qos.logback.classic.spi;resolution:=optional,
							ch.qos.logback.classic.encoder; resolution:=optional,
							ch.qos.logback.classic.filter;resolution:=optional,
							ch.qos.logback.classic.joran;resolution:=optional,
							ch.qos.logback.classic.net;resolution:=optional,

I am getting class cast exception as follows

Cannot cast object 'org.ops4j.pax.logging.slf4j.Slf4jLogger@58b8dec7' with
class 'org.ops4j.pax.logging.slf4j.Slf4jLogger' to class
'ch.qos.logback.classic.Logger'


 



--
View this message in context: http://karaf.922171.n3.nabble.com/Getting-classcast-exception-when-using-Pax-Logging-with-logback-in-karaf-tp4041913.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Mime
View raw message