Thanks jbonofre and Achim for helping me :)
jbonofre wrote > latest section: "Custom appenders". > jbonofre > Pax Logging provides log4j 1.2.15. Indeed ! I have plugged it with the 1.2.15 but I still have the problem. I have checked the latest section of http://karaf.apache.org/manual/latest/users-guide/log.html but have not really find my answer (or perhaps I just mist it) Achim Nierbeck wrote > So you are trying to build a custom Logger, is that right? Yes, we are using Log4j to produce a log file by process so we have write a code which used Log4j ( and works on eclipse and on previous version). I have identified more precisely what is wrong. With 2 simples use cases : 1/ If I do : import org.apache.log4j.*; public void Log(String logname) { Logger filelogger = Logger.getLogger(logname); filelogger.info("HELLO"); } ==> Everything is fine 2/ If I do : public void Log(String logname) { Logger filelogger = Logger.getLogger(logname); filelogger.info("HELLO"); filelogger.removeAllAppenders(); } ==> Aoutch :) Caused by: java.lang.NoSuchMethodError: org.apache.log4j.Logger.removeAllAppenders()V at com.ericsson.mediation.core.bean.LoggerWrapper.Log(LoggerWrapper.java:78)[265:MEDIATION-SI800-Core:1.0.0] I got the felling that in the karaf context, the org.apache.log4j.Logger is not the "real one" and indeed this is a lot of Logger class declared (via a find-class Logger) I would like to know if there is a way to tell to org.ops4j.pax.logging.pax-logging-XXX to use the " real " one ? Thanks for your help :) JF -- View this message in context: http://karaf.922171.n3.nabble.com/NoClassDefFoundError-org-apache-log4j-Layout-tp4033773p4033784.html Sent from the Karaf - User mailing list archive at Nabble.com.
