karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Achim Nierbeck <bcanh...@googlemail.com>
Subject Re: Getting classcast exception when using Pax Logging with logback in karaf
Date Wed, 19 Aug 2015 18:36:18 GMT
Hi,

as the pax-logging-logback bundle contains the needed logback classes
I doubt that you need to install those logback bundles.
Make sure to not install those.

regards, Achim


2015-08-18 17:50 GMT+02:00 mnki <jobs.mohanaki@gmail.com>:

> 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.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Mime
View raw message