karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bengt Rodehav <be...@rodehav.com>
Subject Karaf 2.2.8, Pax-Logging 1.6.7 and NTEventLogAppender - revisited
Date Fri, 05 Oct 2012 08:29:22 GMT
I've previously had problems using the NTEventLogApplender with Karaf
2.2.8. I wrote about it on the mailing list:

http://mail-archives.apache.org/mod_mbox/karaf-user/201206.mbox/%3CCAJ0TPGLbhsSzPNoDUk7o3gswi6tfF4YTe-iFfr52OG_NWbDT9g@mail.gmail.com%3E

I thought I had everything working but now it seems I can only use the
NTEventLogAppender on Windows 64 and not on Windows 32 (like Windows XP). I
have no idea why.

On Windows XP Professional 2002, SP 3 (32 bit system), when running Karaf
2.2.5 (which includes Pax-Logging 1.6.3) I only need to put the
file NTEventLogAppender.dll in the <KARAF_HOME>/lib and everything works
fine.

But, on the same machine, if I instead use Karaf 2.2.8 (which includes
Pax-Logging 1.6.7), I cannot get the appender to work even if I put the DLL
in the same place. I get the following exception:

*2012-10-05 10:00:44,123 | ERROR | s4j.pax.logging) | configadmin
           | ?                                   ? |
[org.osgi.service.log.LogService, org.knopflerfish.service.log.LogService,
org.ops4j.pax.logging.PaxLoggingService,
org.osgi.service.cm.ManagedService, id=8, bundle=3]: Unexpected problem
updating Configuration PID=org.ops4j.pax.logging, factoryPID=null,
bundleLocation=mvn:org.ops4j.pax.logging/pax-logging-service/1.6.7*
*java.lang.UnsatisfiedLinkError:
org.apache.log4j.nt.NTEventLogAppender.registerEventSource(Ljava/lang/String;Ljava/lang/String;)I
*
* at org.apache.log4j.nt.NTEventLogAppender.registerEventSource(Native
Method)[3:org.ops4j.pax.logging.pax-logging-service:1.6.7]*
* at
org.apache.log4j.nt.NTEventLogAppender.<init>(NTEventLogAppender.java:79)[3:org.ops4j.pax.logging.pax-logging-service:1.6.7]
*
* at
org.apache.log4j.nt.NTEventLogAppender.<init>(NTEventLogAppender.java:49)[3:org.ops4j.pax.logging.pax-logging-service:1.6.7]
*
* at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)[:1.6.0_25]*
* at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)[:1.6.0_25]
*
* at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)[:1.6.0_25]
*
* at
java.lang.reflect.Constructor.newInstance(Constructor.java:513)[:1.6.0_25]*
* at java.lang.Class.newInstance0(Class.java:355)[:1.6.0_25]*
* at java.lang.Class.newInstance(Class.java:308)[:1.6.0_25]*
* at
org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:336)[3:org.ops4j.pax.logging.pax-logging-service:1.6.7]
*
* at
org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:123)[3:org.ops4j.pax.logging.pax-logging-service:1.6.7]
*
* at
org.apache.log4j.PaxLoggingConfigurator.parseAppender(PaxLoggingConfigurator.java:81)[3:org.ops4j.pax.logging.pax-logging-service:1.6.7]
*
* at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)[3:org.ops4j.pax.logging.pax-logging-service:1.6.7]
*
* at
org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:639)[3:org.ops4j.pax.logging.pax-logging-service:1.6.7]
*
* at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:504)[3:org.ops4j.pax.logging.pax-logging-service:1.6.7]
*
* at
org.apache.log4j.PaxLoggingConfigurator.doConfigure(PaxLoggingConfigurator.java:57)[3:org.ops4j.pax.logging.pax-logging-service:1.6.7]
*
* at
org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl.updated(PaxLoggingServiceImpl.java:200)[3:org.ops4j.pax.logging.pax-logging-service:1.6.7]
*
* at
org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl$1ManagedPaxLoggingService.updated(PaxLoggingServiceImpl.java:338)[3:org.ops4j.pax.logging.pax-logging-service:1.6.7]
*
* at
org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1490)[5:org.apache.felix.configadmin:1.2.8]
*
* at
org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:104)[5:org.apache.felix.configadmin:1.2.8]
*
* at java.lang.Thread.run(Thread.java:662)[:1.6.0_25]*

Can anyone explain this? It doesn't seem to be a 32 vs 64 bit problem.
Perhaps something changed between Karaf 2.2.5 and Karaf 2.2.8 that could
affect this? Or in between Pax-Logging 1.6.3 and Pax-Logging 1.6.7?

Note that I do get things to work on 64 bit Windows (like Windows 7) with
Karaf 2.2.8 if I instead use the DLL: NTEventLogAppender.amd64.dll.

/Bengt

Mime
View raw message