OK - I guess I misunderstood this then. Looking in the POM's I now see that there are dependencies to both log4j 1.2.16 and log4j 2.x.
I wonder then why the NTEventLogAppender can't be used in Karaf 4.0.5. For a while I thought it might be a java version problem. I now use Java 8 instead of Java 7 like I did before. But even if I run Karaf 4.0.5 using Java 7 I still get the same problem. I will try to use Karaf 4.0.5 with Pax-logging 1.8.1 to see if it makes any difference. What is the best way to accomplish that? /Bengt 2016-06-30 16:54 GMT+02:00 Achim Nierbeck <bcanh...@googlemail.com>: > Hi Bengt, > > newer versions of Pax-Logging don't use log4j2 per default so this should > still work ... > the underlying impl is still log4j 1 unless someone changed it on a minor > version update ... > > regards, Achim > > > 2016-06-30 16:23 GMT+02:00 Bengt Rodehav <be...@rodehav.com>: > >> Thanks JB, >> >> Tried it though and no diffference. >> >> When investigating this it seems like newer versions of pax-logging uses >> log4j2. Unfortunately the NTEventLogAppender is incompatible with log4j2. >> >> I've found the project log4jna that seems to target this. Unfortunately I >> cannot find a released version that supports log4j2. >> >> Anyone else encountered this? >> >> /Bengt >> >> 2016-06-30 14:48 GMT+02:00 Jean-Baptiste Onofré <j...@nanthrax.net>: >> >>> In Karaf 4, the dll should go in lib/ext. >>> >>> Regards >>> JB >>> >>> On 06/30/2016 02:16 PM, Bengt Rodehav wrote: >>> >>>> I have a feeling that I need to put the NTEventLogAppender.amd4.dll in >>>> another directory in Karaf 4.0.5 then in Karaf 2.4.1. >>>> >>>> I have always put it in the directory %KARAF_HOME%/lib which works for >>>> Karaf 2.4.1. Where should DLL's be put in Karaf 4.0.5? >>>> >>>> /Bengt >>>> >>>> 2016-06-29 17:37 GMT+02:00 Bengt Rodehav <be...@rodehav.com >>>> <mailto:be...@rodehav.com>>: >>>> >>>> >>>> I'm trying to upgrade from Karaf 2..1 to 4.0.5 and I run into >>>> problems regarding NTEventLogAppender. I get the following on >>>> startup: >>>> >>>> 2016-06-29 17:16:05,354 | ERROR | 4j.pax.logging]) | configadmin >>>> | ? >>>> ? | [org.osgi.service.log.LogService, >>>> org.knopflerfish.service.log.LogService, >>>> org.ops4j.pax.logging.PaxLoggingService, >>>> org.osgi.service.cm.ManagedService, id=34, >>>> bundle=6/mvn:org.ops4j.pax.logging/pax-logging-service/1.8.5]: >>>> Unexpected problem updating configuration org.ops4j.pax.logging >>>> java.lang.UnsatisfiedLinkError: no NTEventLogAppender in >>>> java.library.path >>>> at >>>> java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)[:1.8.0_74] >>>> at >>>> java.lang.Runtime.loadLibrary0(Runtime.java:870)[:1.8.0_74] >>>> at >>>> java.lang.System.loadLibrary(System.java:1122)[:1.8.0_74] >>>> at >>>> >>>> org.apache.log4j.nt.NTEventLogAppender.<clinit>(NTEventLogAppender.java:179) >>>> at >>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native >>>> Method)[:1.8.0_74] >>>> at >>>> >>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[:1.8.0_74] >>>> at >>>> >>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[:1.8.0_74] >>>> at >>>> >>>> java.lang.reflect.Constructor.newInstance(Constructor.java:423)[:1.8.0_74] >>>> at java.lang.Class.newInstance(Class.java:442)[:1.8.0_74] >>>> at >>>> >>>> org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:336)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5] >>>> at >>>> >>>> org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:123)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5] >>>> at >>>> >>>> org.apache.log4j.PaxLoggingConfigurator.parseAppender(PaxLoggingConfigurator.java:97)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5] >>>> at >>>> >>>> org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5] >>>> at >>>> >>>> org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:639)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5] >>>> at >>>> >>>> org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:504)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5] >>>> at >>>> >>>> org.apache.log4j.PaxLoggingConfigurator.doConfigure(PaxLoggingConfigurator.java:72)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5] >>>> at >>>> >>>> org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl.updated(PaxLoggingServiceImpl.java:214)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5] >>>> at >>>> >>>> org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl$1ManagedPaxLoggingService.updated(PaxLoggingServiceImpl.java:362)[6:org.ops4j.pax.logging.pax-logging-service:1.8.5] >>>> at >>>> >>>> org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[7:org.apache.felix.configadmin:1.8.8] >>>> at >>>> >>>> org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[7:org.apache.felix.configadmin:1.8.8] >>>> at >>>> >>>> org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[7:org.apache.felix.configadmin:1.8.8] >>>> at >>>> >>>> org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1444)[7:org.apache.felix.configadmin:1.8.8] >>>> at >>>> >>>> org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1400)[7:org.apache.felix.configadmin:1.8.8] >>>> at >>>> >>>> org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)[7:org.apache.felix.configadmin:1.8.8] >>>> at >>>> >>>> org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)[7:org.apache.felix.configadmin:1.8.8] >>>> at java.lang.Thread.run(Thread.java:745)[:1.8.0_74] >>>> >>>> Like I did on Karaf 2.4.1, I have put the >>>> file NTEventLogAppender.amd64.dll in the "lib" directory under >>>> Karaf. It has the version 1.2.16.1. >>>> >>>> Does anyone know how to get the NTEventLogAppender to work with >>>> Karaf 4.0.5? >>>> >>>> /Bengt >>>> >>>> >>>> >>>> >>>> >>>> >>> -- >>> Jean-Baptiste Onofré >>> jbono...@apache.org >>> http://blog.nanthrax.net >>> Talend - http://www.talend.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 > >