Re: log4j warning at startup

2021-02-17 Thread Jean-Baptiste Onofre
Thanks for the update. Good to know for windows users.

Regards
JB

> Le 17 févr. 2021 à 16:31, Jörg Jansen  a 
> écrit :
> 
> Hi JB, 
> 
> Just found a solution. 
> Setting system property -Dsun.stdout.encoding=UTF-8 solved the issue. 
> 
> Regards,
> Joerg
> 
> -Original Message-
> From: Jörg Jansen 
> Sent: Mittwoch, 17. Februar 2021 15:03
> To: user 
> Subject: RE: log4j warning at startup
> 
> Hi JB, 
> 
> yes, I tried with the original downloaded  (and unmodified!) assembly. 
> The strange thing is, that it seems only to be present on the Windows server 
> edition. 
> On my local workstation (win 10) it's also working fine. 
> 
> Comparing the classpath and locale settings show no difference.
> 
> Regards,
> Joerg
> 
> -Original Message-
> From: Jean-Baptiste Onofre 
> Sent: Mittwoch, 17. Februar 2021 14:22
> To: user 
> Subject: Re: log4j warning at startup
> 
> Hi Joerg,
> 
> I didn’t see such ERROR message (ok, I’m not using Windows ;)).
> 
> Are you using the default etc/org.ops4j.pax.logging.cfg ?
> 
> Regards
> JB
> 
>> Le 17 févr. 2021 à 12:19, Jörg Jansen  a 
>> écrit :
>> 
>> Hi everybody,
>> 
>> when starting the karaf-container (4.3.0) on a windows server, I receive the 
>> following logging warning at startup: 
>> 
>>  org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create 
>> plugin of type class org.apache.logging.log4j.core.appender.ConsoleAppender 
>> for element Console: java.util.MissingResourceException: Can't find bundle 
>> for base name Log4j-charsets, locale en_US
>>   org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke 
>> factory method in class 
>> org.apache.logging.log4j.core.appender.ConsoleAppender for element Console: 
>> java.lang.IllegalStateException: No factory method found for class 
>> org.apache.logging.log4j.core.appender.ConsoleAppender
>>   org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Null object 
>> returned for Console in Appenders.
>>   org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to locate 
>> appender "Console" for logger config "root"
>> 
>> It doesn't matter, if it's startet as a common user or administrator. 
>> 
>> It only appears on this dedicated server, which is Windows Server 2019 
>> Standard in version 10.0.17763.
>> The used Java derivat is AdoptOpenJDK-8 (8.0.222.10-hotspot jre)
>> 
>> Does anybody has an idea where to search for a reason?
>> 
>> Thanks in advance,
>> Joerg
>> 
>> ---
>> Joerg Jansen
>> Aviation Division
>> 
>> INFORM GmbH / Pascalstr. 35 / 52076 Aachen / Germany Office +49 (0)
>> 2408/9456-3894 / Mobile+49 (0) 151-52657435 
>> joerg.jan...@inform-software.com / www.inform-software.com
>> 
>> INFORM Institut f. Operations Research und Management GmbH Registered 
>> AmtsG Aachen HRB1144 Co-CEO Adrian Weiler / Dr. Andreas Meyer / Dr.
>> Joerg Herbers / Matthias Berlit / Peter Frerichs
>> 
> 



RE: log4j warning at startup

2021-02-17 Thread Jörg Jansen
Hi JB, 

Just found a solution. 
Setting system property -Dsun.stdout.encoding=UTF-8 solved the issue. 

Regards,
Joerg

-Original Message-
From: Jörg Jansen 
Sent: Mittwoch, 17. Februar 2021 15:03
To: user 
Subject: RE: log4j warning at startup

Hi JB, 

yes, I tried with the original downloaded  (and unmodified!) assembly. 
The strange thing is, that it seems only to be present on the Windows server 
edition. 
On my local workstation (win 10) it's also working fine. 

Comparing the classpath and locale settings show no difference.

Regards,
Joerg

-Original Message-
From: Jean-Baptiste Onofre 
Sent: Mittwoch, 17. Februar 2021 14:22
To: user 
Subject: Re: log4j warning at startup

Hi Joerg,

I didn’t see such ERROR message (ok, I’m not using Windows ;)).

Are you using the default etc/org.ops4j.pax.logging.cfg ?

Regards
JB

> Le 17 févr. 2021 à 12:19, Jörg Jansen  a 
> écrit :
> 
> Hi everybody,
> 
> when starting the karaf-container (4.3.0) on a windows server, I receive the 
> following logging warning at startup: 
> 
>   org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create 
> plugin of type class org.apache.logging.log4j.core.appender.ConsoleAppender 
> for element Console: java.util.MissingResourceException: Can't find bundle 
> for base name Log4j-charsets, locale en_US
>org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke 
> factory method in class 
> org.apache.logging.log4j.core.appender.ConsoleAppender for element Console: 
> java.lang.IllegalStateException: No factory method found for class 
> org.apache.logging.log4j.core.appender.ConsoleAppender
>org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Null object 
> returned for Console in Appenders.
>org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to locate 
> appender "Console" for logger config "root"
> 
> It doesn't matter, if it's startet as a common user or administrator. 
> 
> It only appears on this dedicated server, which is Windows Server 2019 
> Standard in version 10.0.17763.
> The used Java derivat is AdoptOpenJDK-8 (8.0.222.10-hotspot jre)
> 
> Does anybody has an idea where to search for a reason?
> 
> Thanks in advance,
> Joerg
> 
> ---
> Joerg Jansen
> Aviation Division
> 
> INFORM GmbH / Pascalstr. 35 / 52076 Aachen / Germany Office +49 (0)
> 2408/9456-3894 / Mobile+49 (0) 151-52657435 
> joerg.jan...@inform-software.com / www.inform-software.com
> 
> INFORM Institut f. Operations Research und Management GmbH Registered 
> AmtsG Aachen HRB1144 Co-CEO Adrian Weiler / Dr. Andreas Meyer / Dr.
> Joerg Herbers / Matthias Berlit / Peter Frerichs
> 



RE: log4j warning at startup

2021-02-17 Thread Jörg Jansen
Hi JB, 

yes, I tried with the original downloaded  (and unmodified!) assembly. 
The strange thing is, that it seems only to be present on the Windows server 
edition. 
On my local workstation (win 10) it's also working fine. 

Comparing the classpath and locale settings show no difference.

Regards,
Joerg

-Original Message-
From: Jean-Baptiste Onofre  
Sent: Mittwoch, 17. Februar 2021 14:22
To: user 
Subject: Re: log4j warning at startup

Hi Joerg,

I didn’t see such ERROR message (ok, I’m not using Windows ;)).

Are you using the default etc/org.ops4j.pax.logging.cfg ?

Regards
JB

> Le 17 févr. 2021 à 12:19, Jörg Jansen  a 
> écrit :
> 
> Hi everybody,
> 
> when starting the karaf-container (4.3.0) on a windows server, I receive the 
> following logging warning at startup: 
> 
>   org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create 
> plugin of type class org.apache.logging.log4j.core.appender.ConsoleAppender 
> for element Console: java.util.MissingResourceException: Can't find bundle 
> for base name Log4j-charsets, locale en_US
>org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke 
> factory method in class 
> org.apache.logging.log4j.core.appender.ConsoleAppender for element Console: 
> java.lang.IllegalStateException: No factory method found for class 
> org.apache.logging.log4j.core.appender.ConsoleAppender
>org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Null object 
> returned for Console in Appenders.
>org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to locate 
> appender "Console" for logger config "root"
> 
> It doesn't matter, if it's startet as a common user or administrator. 
> 
> It only appears on this dedicated server, which is Windows Server 2019 
> Standard in version 10.0.17763.
> The used Java derivat is AdoptOpenJDK-8 (8.0.222.10-hotspot jre)
> 
> Does anybody has an idea where to search for a reason?
> 
> Thanks in advance,
> Joerg
> 
> ---
> Joerg Jansen
> Aviation Division
> 
> INFORM GmbH / Pascalstr. 35 / 52076 Aachen / Germany Office +49 (0) 
> 2408/9456-3894 / Mobile+49 (0) 151-52657435 
> joerg.jan...@inform-software.com / www.inform-software.com
> 
> INFORM Institut f. Operations Research und Management GmbH Registered 
> AmtsG Aachen HRB1144 Co-CEO Adrian Weiler / Dr. Andreas Meyer / Dr. 
> Joerg Herbers / Matthias Berlit / Peter Frerichs
> 



Re: log4j warning at startup

2021-02-17 Thread Jean-Baptiste Onofre
Hi Joerg,

I didn’t see such ERROR message (ok, I’m not using Windows ;)).

Are you using the default etc/org.ops4j.pax.logging.cfg ?

Regards
JB

> Le 17 févr. 2021 à 12:19, Jörg Jansen  a 
> écrit :
> 
> Hi everybody,
> 
> when starting the karaf-container (4.3.0) on a windows server, I receive the 
> following logging warning at startup: 
> 
>   org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create 
> plugin of type class org.apache.logging.log4j.core.appender.ConsoleAppender 
> for element Console: java.util.MissingResourceException: Can't find bundle 
> for base name Log4j-charsets, locale en_US
>org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke 
> factory method in class 
> org.apache.logging.log4j.core.appender.ConsoleAppender for element Console: 
> java.lang.IllegalStateException: No factory method found for class 
> org.apache.logging.log4j.core.appender.ConsoleAppender
>org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Null object 
> returned for Console in Appenders.
>org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to locate 
> appender "Console" for logger config "root"
> 
> It doesn't matter, if it's startet as a common user or administrator. 
> 
> It only appears on this dedicated server, which is Windows Server 2019 
> Standard in version 10.0.17763.
> The used Java derivat is AdoptOpenJDK-8 (8.0.222.10-hotspot jre)
> 
> Does anybody has an idea where to search for a reason?
> 
> Thanks in advance, 
> Joerg
> 
> ---
> Joerg Jansen
> Aviation Division
> 
> INFORM GmbH / Pascalstr. 35 / 52076 Aachen / Germany
> Office +49 (0) 2408/9456-3894 / Mobile+49 (0) 151-52657435
> joerg.jan...@inform-software.com / www.inform-software.com
> 
> INFORM Institut f. Operations Research und Management GmbH
> Registered AmtsG Aachen HRB1144
> Co-CEO Adrian Weiler / Dr. Andreas Meyer / Dr. Joerg Herbers / Matthias 
> Berlit / Peter Frerichs
> 



Re: Log4j NTEventLogAppender in Karaf 4.0.5

2016-07-12 Thread Bengt Rodehav
OK - thanks for trying.

/Bengt

2016-07-12 11:12 GMT+02:00 Achim Nierbeck :

> Hi Bengt,
>
> sorry been very busy lately. I did give it a try but couldn't find a
> reason why Log4j2 should be used or Pax Logging should be triggered to be
> restarted. There isn't any reason for the pax web bundles to do so ... :/
> sorry didn't get any further on this ..
>
> regards, Achim
>
>
>
>
> 2016-07-11 14:47 GMT+02:00 Bengt Rodehav :
>
>> Did you have a chance to look at this Achim? If there is a problem with
>> the pax-jetty feature it would be nice to have it fixed in Karaf 4.0.6
>> which I understand is in the works.
>>
>> /Bengt
>>
>> 2016-07-07 9:13 GMT+02:00 Bengt Rodehav :
>>
>>> OK - thanks Achim,
>>>
>>> /Bengt
>>>
>>> 2016-07-06 22:08 GMT+02:00 Achim Nierbeck :
>>>
 Hi Bengt,

 I'll try to find out if one of the bundles in that feature depends on
 log4j2 ... but I'm not aware of such a dependency.

 Your suspicion about dynamic loading of DLLs is correct in case of the
 location of the dll is inside of a bundle and does have dependencies to
 another dll. If it's a dll loaded via the root classloader that shouldn't
 be of an issue.

 regards, Achim


 2016-07-04 16:04 GMT+02:00 Bengt Rodehav :

> Another theory: Looking at the stack trace this seems to be triggered
> by a configuration update. Could the problem be that Pax-logging is trying
> to load the DLL again and failing since it is already loaded? Perhaps the
> initial load works but subsequent configuration updates does not?
>
> I tried to verify this...
>
> After successful start of Karaf (after step 9 in my previous post), I
> edit org.ops4j.pas.logging.cfg (by changing the root logger between INFO
> and DEBUG). This causes no error.
>
> But after having installed feature pax-jetty (after step 10 in my
> previous post), every change in org.ops4j.pas.logging.cfg causes the same
> error to appear (the stack trace included in my previous post).
>
> It's as if installing the pax-jetty feature takes gives control of
> org.ops4j.pas.logging.cfg to someone who cannot load the DLL. I have no
> idea how this could happen.
>
> Anyone else has an idea?
>
> /Bengt
>
>
>
>
>
>
>
> /Bengt
>
> 2016-07-04 15:51 GMT+02:00 Bengt Rodehav :
>
>> A theory: Could one of the bundles installed by feature pax-jetty be
>> using log4j 2.x directly without using Pax-logging? If so, would it too 
>> try
>> to read the log4j configuration file? I guess it would fail to load the 
>> DLL
>> since it is probably not compatible with log4j 2.x.
>>
>> Could this happen? If so, how can I find out which bundle?
>>
>> /Bengt
>>
>> 2016-07-04 15:15 GMT+02:00 Bengt Rodehav :
>>
>>> Back to the Karaf mailing list
>>>
>>> I can actually get this problem on a standard vanilla Karaf 4.0.5.
>>> It seems to be triggered when installing the feature pax-jetty.
>>>
>>> *1. Install standard Karaf 4.0.5*
>>>
>>> *2. Replace org.ops4j.pax.logging.cfg with the following:*
>>>
>>> log4j.rootLogger=INFO, stdout
>>>
>>> # CONSOLE appender
>>> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>>> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>>> log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p
>>> | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
>>> log4j.appender.stdout.threshold=ERROR
>>>
>>> # Windows event log
>>> log4j.appender.nteventlog=org.apache.log4j.nt.NTEventLogAppender
>>> log4j.appender.nteventlog.source=Test source
>>> log4j.appender.nteventlog.layout=org.apache.log4j.PatternLayout
>>> log4j.appender.nteventlog.layout.ConversionPattern=Time:
>>> %d{ISO8601}%n%nSeverity: %p%n%nThread: %t%n%n%m%n
>>> log4j.appender.nteventlog.threshold=DEBUG
>>>
>>> *3. Start Karaf: "bin\karaf clean"*
>>>
>>> This should work.
>>>
>>> *4. Exit Karaf*
>>>
>>> *5. Change the root looger line to:*
>>>
>>> log4j.rootLogger=INFO, stdout, nteventlog
>>>
>>> *6. Start Karaf again*
>>>
>>> I get the following error:
>>>
>>> 2016-07-04 15:05:39,534 | 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=12,
>>> 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
>>> 

Re: Log4j NTEventLogAppender in Karaf 4.0.5

2016-07-12 Thread Achim Nierbeck
Hi Bengt,

sorry been very busy lately. I did give it a try but couldn't find a reason
why Log4j2 should be used or Pax Logging should be triggered to be
restarted. There isn't any reason for the pax web bundles to do so ... :/
sorry didn't get any further on this ..

regards, Achim




2016-07-11 14:47 GMT+02:00 Bengt Rodehav :

> Did you have a chance to look at this Achim? If there is a problem with
> the pax-jetty feature it would be nice to have it fixed in Karaf 4.0.6
> which I understand is in the works.
>
> /Bengt
>
> 2016-07-07 9:13 GMT+02:00 Bengt Rodehav :
>
>> OK - thanks Achim,
>>
>> /Bengt
>>
>> 2016-07-06 22:08 GMT+02:00 Achim Nierbeck :
>>
>>> Hi Bengt,
>>>
>>> I'll try to find out if one of the bundles in that feature depends on
>>> log4j2 ... but I'm not aware of such a dependency.
>>>
>>> Your suspicion about dynamic loading of DLLs is correct in case of the
>>> location of the dll is inside of a bundle and does have dependencies to
>>> another dll. If it's a dll loaded via the root classloader that shouldn't
>>> be of an issue.
>>>
>>> regards, Achim
>>>
>>>
>>> 2016-07-04 16:04 GMT+02:00 Bengt Rodehav :
>>>
 Another theory: Looking at the stack trace this seems to be triggered
 by a configuration update. Could the problem be that Pax-logging is trying
 to load the DLL again and failing since it is already loaded? Perhaps the
 initial load works but subsequent configuration updates does not?

 I tried to verify this...

 After successful start of Karaf (after step 9 in my previous post), I
 edit org.ops4j.pas.logging.cfg (by changing the root logger between INFO
 and DEBUG). This causes no error.

 But after having installed feature pax-jetty (after step 10 in my
 previous post), every change in org.ops4j.pas.logging.cfg causes the same
 error to appear (the stack trace included in my previous post).

 It's as if installing the pax-jetty feature takes gives control of
 org.ops4j.pas.logging.cfg to someone who cannot load the DLL. I have no
 idea how this could happen.

 Anyone else has an idea?

 /Bengt







 /Bengt

 2016-07-04 15:51 GMT+02:00 Bengt Rodehav :

> A theory: Could one of the bundles installed by feature pax-jetty be
> using log4j 2.x directly without using Pax-logging? If so, would it too 
> try
> to read the log4j configuration file? I guess it would fail to load the 
> DLL
> since it is probably not compatible with log4j 2.x.
>
> Could this happen? If so, how can I find out which bundle?
>
> /Bengt
>
> 2016-07-04 15:15 GMT+02:00 Bengt Rodehav :
>
>> Back to the Karaf mailing list
>>
>> I can actually get this problem on a standard vanilla Karaf 4.0.5. It
>> seems to be triggered when installing the feature pax-jetty.
>>
>> *1. Install standard Karaf 4.0.5*
>>
>> *2. Replace org.ops4j.pax.logging.cfg with the following:*
>>
>> log4j.rootLogger=INFO, stdout
>>
>> # CONSOLE appender
>> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>> log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p |
>> %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
>> log4j.appender.stdout.threshold=ERROR
>>
>> # Windows event log
>> log4j.appender.nteventlog=org.apache.log4j.nt.NTEventLogAppender
>> log4j.appender.nteventlog.source=Test source
>> log4j.appender.nteventlog.layout=org.apache.log4j.PatternLayout
>> log4j.appender.nteventlog.layout.ConversionPattern=Time:
>> %d{ISO8601}%n%nSeverity: %p%n%nThread: %t%n%n%m%n
>> log4j.appender.nteventlog.threshold=DEBUG
>>
>> *3. Start Karaf: "bin\karaf clean"*
>>
>> This should work.
>>
>> *4. Exit Karaf*
>>
>> *5. Change the root looger line to:*
>>
>> log4j.rootLogger=INFO, stdout, nteventlog
>>
>> *6. Start Karaf again*
>>
>> I get the following error:
>>
>> 2016-07-04 15:05:39,534 | 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=12,
>> 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)
>> at java.lang.Runtime.loadLibrary0(Runtime.java:870)
>> at java.lang.System.loadLibrary(System.java:1122)
>> at
>> 

Re: Log4j NTEventLogAppender in Karaf 4.0.5

2016-07-11 Thread Bengt Rodehav
Did you have a chance to look at this Achim? If there is a problem with the
pax-jetty feature it would be nice to have it fixed in Karaf 4.0.6 which I
understand is in the works.

/Bengt

2016-07-07 9:13 GMT+02:00 Bengt Rodehav :

> OK - thanks Achim,
>
> /Bengt
>
> 2016-07-06 22:08 GMT+02:00 Achim Nierbeck :
>
>> Hi Bengt,
>>
>> I'll try to find out if one of the bundles in that feature depends on
>> log4j2 ... but I'm not aware of such a dependency.
>>
>> Your suspicion about dynamic loading of DLLs is correct in case of the
>> location of the dll is inside of a bundle and does have dependencies to
>> another dll. If it's a dll loaded via the root classloader that shouldn't
>> be of an issue.
>>
>> regards, Achim
>>
>>
>> 2016-07-04 16:04 GMT+02:00 Bengt Rodehav :
>>
>>> Another theory: Looking at the stack trace this seems to be triggered by
>>> a configuration update. Could the problem be that Pax-logging is trying to
>>> load the DLL again and failing since it is already loaded? Perhaps the
>>> initial load works but subsequent configuration updates does not?
>>>
>>> I tried to verify this...
>>>
>>> After successful start of Karaf (after step 9 in my previous post), I
>>> edit org.ops4j.pas.logging.cfg (by changing the root logger between INFO
>>> and DEBUG). This causes no error.
>>>
>>> But after having installed feature pax-jetty (after step 10 in my
>>> previous post), every change in org.ops4j.pas.logging.cfg causes the same
>>> error to appear (the stack trace included in my previous post).
>>>
>>> It's as if installing the pax-jetty feature takes gives control of
>>> org.ops4j.pas.logging.cfg to someone who cannot load the DLL. I have no
>>> idea how this could happen.
>>>
>>> Anyone else has an idea?
>>>
>>> /Bengt
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> /Bengt
>>>
>>> 2016-07-04 15:51 GMT+02:00 Bengt Rodehav :
>>>
 A theory: Could one of the bundles installed by feature pax-jetty be
 using log4j 2.x directly without using Pax-logging? If so, would it too try
 to read the log4j configuration file? I guess it would fail to load the DLL
 since it is probably not compatible with log4j 2.x.

 Could this happen? If so, how can I find out which bundle?

 /Bengt

 2016-07-04 15:15 GMT+02:00 Bengt Rodehav :

> Back to the Karaf mailing list
>
> I can actually get this problem on a standard vanilla Karaf 4.0.5. It
> seems to be triggered when installing the feature pax-jetty.
>
> *1. Install standard Karaf 4.0.5*
>
> *2. Replace org.ops4j.pax.logging.cfg with the following:*
>
> log4j.rootLogger=INFO, stdout
>
> # CONSOLE appender
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p |
> %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
> log4j.appender.stdout.threshold=ERROR
>
> # Windows event log
> log4j.appender.nteventlog=org.apache.log4j.nt.NTEventLogAppender
> log4j.appender.nteventlog.source=Test source
> log4j.appender.nteventlog.layout=org.apache.log4j.PatternLayout
> log4j.appender.nteventlog.layout.ConversionPattern=Time:
> %d{ISO8601}%n%nSeverity: %p%n%nThread: %t%n%n%m%n
> log4j.appender.nteventlog.threshold=DEBUG
>
> *3. Start Karaf: "bin\karaf clean"*
>
> This should work.
>
> *4. Exit Karaf*
>
> *5. Change the root looger line to:*
>
> log4j.rootLogger=INFO, stdout, nteventlog
>
> *6. Start Karaf again*
>
> I get the following error:
>
> 2016-07-04 15:05:39,534 | 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=12,
> 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)
> at java.lang.Runtime.loadLibrary0(Runtime.java:870)
> at java.lang.System.loadLibrary(System.java:1122)
> at
> org.apache.log4j.nt.NTEventLogAppender.(NTEventLogAppender.java:179)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at
> java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> at 

Re: Log4j NTEventLogAppender in Karaf 4.0.5

2016-07-07 Thread Bengt Rodehav
OK - thanks Achim,

/Bengt

2016-07-06 22:08 GMT+02:00 Achim Nierbeck :

> Hi Bengt,
>
> I'll try to find out if one of the bundles in that feature depends on
> log4j2 ... but I'm not aware of such a dependency.
>
> Your suspicion about dynamic loading of DLLs is correct in case of the
> location of the dll is inside of a bundle and does have dependencies to
> another dll. If it's a dll loaded via the root classloader that shouldn't
> be of an issue.
>
> regards, Achim
>
>
> 2016-07-04 16:04 GMT+02:00 Bengt Rodehav :
>
>> Another theory: Looking at the stack trace this seems to be triggered by
>> a configuration update. Could the problem be that Pax-logging is trying to
>> load the DLL again and failing since it is already loaded? Perhaps the
>> initial load works but subsequent configuration updates does not?
>>
>> I tried to verify this...
>>
>> After successful start of Karaf (after step 9 in my previous post), I
>> edit org.ops4j.pas.logging.cfg (by changing the root logger between INFO
>> and DEBUG). This causes no error.
>>
>> But after having installed feature pax-jetty (after step 10 in my
>> previous post), every change in org.ops4j.pas.logging.cfg causes the same
>> error to appear (the stack trace included in my previous post).
>>
>> It's as if installing the pax-jetty feature takes gives control of
>> org.ops4j.pas.logging.cfg to someone who cannot load the DLL. I have no
>> idea how this could happen.
>>
>> Anyone else has an idea?
>>
>> /Bengt
>>
>>
>>
>>
>>
>>
>>
>> /Bengt
>>
>> 2016-07-04 15:51 GMT+02:00 Bengt Rodehav :
>>
>>> A theory: Could one of the bundles installed by feature pax-jetty be
>>> using log4j 2.x directly without using Pax-logging? If so, would it too try
>>> to read the log4j configuration file? I guess it would fail to load the DLL
>>> since it is probably not compatible with log4j 2.x.
>>>
>>> Could this happen? If so, how can I find out which bundle?
>>>
>>> /Bengt
>>>
>>> 2016-07-04 15:15 GMT+02:00 Bengt Rodehav :
>>>
 Back to the Karaf mailing list

 I can actually get this problem on a standard vanilla Karaf 4.0.5. It
 seems to be triggered when installing the feature pax-jetty.

 *1. Install standard Karaf 4.0.5*

 *2. Replace org.ops4j.pax.logging.cfg with the following:*

 log4j.rootLogger=INFO, stdout

 # CONSOLE appender
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p |
 %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
 log4j.appender.stdout.threshold=ERROR

 # Windows event log
 log4j.appender.nteventlog=org.apache.log4j.nt.NTEventLogAppender
 log4j.appender.nteventlog.source=Test source
 log4j.appender.nteventlog.layout=org.apache.log4j.PatternLayout
 log4j.appender.nteventlog.layout.ConversionPattern=Time:
 %d{ISO8601}%n%nSeverity: %p%n%nThread: %t%n%n%m%n
 log4j.appender.nteventlog.threshold=DEBUG

 *3. Start Karaf: "bin\karaf clean"*

 This should work.

 *4. Exit Karaf*

 *5. Change the root looger line to:*

 log4j.rootLogger=INFO, stdout, nteventlog

 *6. Start Karaf again*

 I get the following error:

 2016-07-04 15:05:39,534 | 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=12,
 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)
 at java.lang.Runtime.loadLibrary0(Runtime.java:870)
 at java.lang.System.loadLibrary(System.java:1122)
 at
 org.apache.log4j.nt.NTEventLogAppender.(NTEventLogAppender.java:179)
 at
 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at
 java.lang.reflect.Constructor.newInstance(Constructor.java:423)
 at java.lang.Class.newInstance(Class.java:442)
 at
 org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:336)
 at
 org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:123)
 at
 org.apache.log4j.PaxLoggingConfigurator.parseAppender(PaxLoggingConfigurator.java:97)
 at
 

Re: Log4j NTEventLogAppender in Karaf 4.0.5

2016-07-06 Thread Achim Nierbeck
Hi Bengt,

I'll try to find out if one of the bundles in that feature depends on
log4j2 ... but I'm not aware of such a dependency.

Your suspicion about dynamic loading of DLLs is correct in case of the
location of the dll is inside of a bundle and does have dependencies to
another dll. If it's a dll loaded via the root classloader that shouldn't
be of an issue.

regards, Achim


2016-07-04 16:04 GMT+02:00 Bengt Rodehav :

> Another theory: Looking at the stack trace this seems to be triggered by a
> configuration update. Could the problem be that Pax-logging is trying to
> load the DLL again and failing since it is already loaded? Perhaps the
> initial load works but subsequent configuration updates does not?
>
> I tried to verify this...
>
> After successful start of Karaf (after step 9 in my previous post), I edit
> org.ops4j.pas.logging.cfg (by changing the root logger between INFO and
> DEBUG). This causes no error.
>
> But after having installed feature pax-jetty (after step 10 in my previous
> post), every change in org.ops4j.pas.logging.cfg causes the same error to
> appear (the stack trace included in my previous post).
>
> It's as if installing the pax-jetty feature takes gives control of
> org.ops4j.pas.logging.cfg to someone who cannot load the DLL. I have no
> idea how this could happen.
>
> Anyone else has an idea?
>
> /Bengt
>
>
>
>
>
>
>
> /Bengt
>
> 2016-07-04 15:51 GMT+02:00 Bengt Rodehav :
>
>> A theory: Could one of the bundles installed by feature pax-jetty be
>> using log4j 2.x directly without using Pax-logging? If so, would it too try
>> to read the log4j configuration file? I guess it would fail to load the DLL
>> since it is probably not compatible with log4j 2.x.
>>
>> Could this happen? If so, how can I find out which bundle?
>>
>> /Bengt
>>
>> 2016-07-04 15:15 GMT+02:00 Bengt Rodehav :
>>
>>> Back to the Karaf mailing list
>>>
>>> I can actually get this problem on a standard vanilla Karaf 4.0.5. It
>>> seems to be triggered when installing the feature pax-jetty.
>>>
>>> *1. Install standard Karaf 4.0.5*
>>>
>>> *2. Replace org.ops4j.pax.logging.cfg with the following:*
>>>
>>> log4j.rootLogger=INFO, stdout
>>>
>>> # CONSOLE appender
>>> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>>> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>>> log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p |
>>> %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
>>> log4j.appender.stdout.threshold=ERROR
>>>
>>> # Windows event log
>>> log4j.appender.nteventlog=org.apache.log4j.nt.NTEventLogAppender
>>> log4j.appender.nteventlog.source=Test source
>>> log4j.appender.nteventlog.layout=org.apache.log4j.PatternLayout
>>> log4j.appender.nteventlog.layout.ConversionPattern=Time:
>>> %d{ISO8601}%n%nSeverity: %p%n%nThread: %t%n%n%m%n
>>> log4j.appender.nteventlog.threshold=DEBUG
>>>
>>> *3. Start Karaf: "bin\karaf clean"*
>>>
>>> This should work.
>>>
>>> *4. Exit Karaf*
>>>
>>> *5. Change the root looger line to:*
>>>
>>> log4j.rootLogger=INFO, stdout, nteventlog
>>>
>>> *6. Start Karaf again*
>>>
>>> I get the following error:
>>>
>>> 2016-07-04 15:05:39,534 | 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=12,
>>> 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)
>>> at java.lang.Runtime.loadLibrary0(Runtime.java:870)
>>> at java.lang.System.loadLibrary(System.java:1122)
>>> at
>>> org.apache.log4j.nt.NTEventLogAppender.(NTEventLogAppender.java:179)
>>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>>> Method)
>>> at
>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>>> at
>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>> at
>>> java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>>> at java.lang.Class.newInstance(Class.java:442)
>>> at
>>> org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:336)
>>> at
>>> org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:123)
>>> at
>>> org.apache.log4j.PaxLoggingConfigurator.parseAppender(PaxLoggingConfigurator.java:97)
>>> at
>>> org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
>>> at
>>> org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
>>> at
>>> 

Re: Log4j NTEventLogAppender in Karaf 4.0.5

2016-07-04 Thread Bengt Rodehav
Another theory: Looking at the stack trace this seems to be triggered by a
configuration update. Could the problem be that Pax-logging is trying to
load the DLL again and failing since it is already loaded? Perhaps the
initial load works but subsequent configuration updates does not?

I tried to verify this...

After successful start of Karaf (after step 9 in my previous post), I edit
org.ops4j.pas.logging.cfg (by changing the root logger between INFO and
DEBUG). This causes no error.

But after having installed feature pax-jetty (after step 10 in my previous
post), every change in org.ops4j.pas.logging.cfg causes the same error to
appear (the stack trace included in my previous post).

It's as if installing the pax-jetty feature takes gives control of
org.ops4j.pas.logging.cfg to someone who cannot load the DLL. I have no
idea how this could happen.

Anyone else has an idea?

/Bengt







/Bengt

2016-07-04 15:51 GMT+02:00 Bengt Rodehav :

> A theory: Could one of the bundles installed by feature pax-jetty be using
> log4j 2.x directly without using Pax-logging? If so, would it too try to
> read the log4j configuration file? I guess it would fail to load the DLL
> since it is probably not compatible with log4j 2.x.
>
> Could this happen? If so, how can I find out which bundle?
>
> /Bengt
>
> 2016-07-04 15:15 GMT+02:00 Bengt Rodehav :
>
>> Back to the Karaf mailing list
>>
>> I can actually get this problem on a standard vanilla Karaf 4.0.5. It
>> seems to be triggered when installing the feature pax-jetty.
>>
>> *1. Install standard Karaf 4.0.5*
>>
>> *2. Replace org.ops4j.pax.logging.cfg with the following:*
>>
>> log4j.rootLogger=INFO, stdout
>>
>> # CONSOLE appender
>> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>> log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p |
>> %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
>> log4j.appender.stdout.threshold=ERROR
>>
>> # Windows event log
>> log4j.appender.nteventlog=org.apache.log4j.nt.NTEventLogAppender
>> log4j.appender.nteventlog.source=Test source
>> log4j.appender.nteventlog.layout=org.apache.log4j.PatternLayout
>> log4j.appender.nteventlog.layout.ConversionPattern=Time:
>> %d{ISO8601}%n%nSeverity: %p%n%nThread: %t%n%n%m%n
>> log4j.appender.nteventlog.threshold=DEBUG
>>
>> *3. Start Karaf: "bin\karaf clean"*
>>
>> This should work.
>>
>> *4. Exit Karaf*
>>
>> *5. Change the root looger line to:*
>>
>> log4j.rootLogger=INFO, stdout, nteventlog
>>
>> *6. Start Karaf again*
>>
>> I get the following error:
>>
>> 2016-07-04 15:05:39,534 | 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=12,
>> 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)
>> at java.lang.Runtime.loadLibrary0(Runtime.java:870)
>> at java.lang.System.loadLibrary(System.java:1122)
>> at
>> org.apache.log4j.nt.NTEventLogAppender.(NTEventLogAppender.java:179)
>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>> at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>> at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>> at java.lang.Class.newInstance(Class.java:442)
>> at
>> org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:336)
>> at
>> org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:123)
>> at
>> org.apache.log4j.PaxLoggingConfigurator.parseAppender(PaxLoggingConfigurator.java:97)
>> at
>> org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
>> at
>> org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
>> at
>> org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
>> at
>> org.apache.log4j.PaxLoggingConfigurator.doConfigure(PaxLoggingConfigurator.java:72)
>> at
>> org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl.updated(PaxLoggingServiceImpl.java:214)
>> at
>> org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl$1ManagedPaxLoggingService.updated(PaxLoggingServiceImpl.java:362)
>> at
>> org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)
>> at
>> 

Re: Log4j NTEventLogAppender in Karaf 4.0.5

2016-07-04 Thread Bengt Rodehav
A theory: Could one of the bundles installed by feature pax-jetty be using
log4j 2.x directly without using Pax-logging? If so, would it too try to
read the log4j configuration file? I guess it would fail to load the DLL
since it is probably not compatible with log4j 2.x.

Could this happen? If so, how can I find out which bundle?

/Bengt

2016-07-04 15:15 GMT+02:00 Bengt Rodehav :

> Back to the Karaf mailing list
>
> I can actually get this problem on a standard vanilla Karaf 4.0.5. It
> seems to be triggered when installing the feature pax-jetty.
>
> *1. Install standard Karaf 4.0.5*
>
> *2. Replace org.ops4j.pax.logging.cfg with the following:*
>
> log4j.rootLogger=INFO, stdout
>
> # CONSOLE appender
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p |
> %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
> log4j.appender.stdout.threshold=ERROR
>
> # Windows event log
> log4j.appender.nteventlog=org.apache.log4j.nt.NTEventLogAppender
> log4j.appender.nteventlog.source=Test source
> log4j.appender.nteventlog.layout=org.apache.log4j.PatternLayout
> log4j.appender.nteventlog.layout.ConversionPattern=Time:
> %d{ISO8601}%n%nSeverity: %p%n%nThread: %t%n%n%m%n
> log4j.appender.nteventlog.threshold=DEBUG
>
> *3. Start Karaf: "bin\karaf clean"*
>
> This should work.
>
> *4. Exit Karaf*
>
> *5. Change the root looger line to:*
>
> log4j.rootLogger=INFO, stdout, nteventlog
>
> *6. Start Karaf again*
>
> I get the following error:
>
> 2016-07-04 15:05:39,534 | 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=12,
> 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)
> at java.lang.Runtime.loadLibrary0(Runtime.java:870)
> at java.lang.System.loadLibrary(System.java:1122)
> at
> org.apache.log4j.nt.NTEventLogAppender.(NTEventLogAppender.java:179)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> at java.lang.Class.newInstance(Class.java:442)
> at
> org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:336)
> at
> org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:123)
> at
> org.apache.log4j.PaxLoggingConfigurator.parseAppender(PaxLoggingConfigurator.java:97)
> at
> org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
> at
> org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
> at
> org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
> at
> org.apache.log4j.PaxLoggingConfigurator.doConfigure(PaxLoggingConfigurator.java:72)
> at
> org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl.updated(PaxLoggingServiceImpl.java:214)
> at
> org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl$1ManagedPaxLoggingService.updated(PaxLoggingServiceImpl.java:362)
> at
> org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)
> at
> org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)
> at
> org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)
> at
> org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1753)
> at
> org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)
> at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)
> at java.lang.Thread.run(Thread.java:745)
>
> This makes sense since I haven't provided the DLL yet.
>
> *7. Exit Karaf*
>
> *8. Put the file NTEventLogAppender.amd64.dll in KARAF_HOME/lib (I attach
> the file for 64 bit Windows)*
>
> *9. Start Karaf again*
>
> This works - no error messages. I take this as "proof" that the DLL has
> been successfully loaded.
>
> *10. Install pax-jetty:*
>
> feature:install pax-jetty
>
> I now get the following error:
>
> 2016-07-04 15:11:17,854 | ERROR | 4j.pax.logging]) | configadmin
>| ?? | [org.osgi.service.log.LogService,
> 

Re: Log4j NTEventLogAppender in Karaf 4.0.5

2016-07-01 Thread Bengt Rodehav
Turned out not to be so easy to switch version of Pax-logging.

I edited startup.properties.I also had to change version of pax-url-aether
to 2.3.0. However, it seems like org.apache.karaf.features.core bundle
requires a version of pax-url-aehter that is at least 2.4. However, I still
think that the results I got indicates that the NTEventLogAppender works
with Pax-logging 1.8.1 but not with 1.8.5.

Switching to Pax-logging 1.8.1 using Karaf 4.0.5 gives me the following
error message if I put the NTEventLogAppender.amd64.dll in the
%KARAF_HOME%\lib directory:

ERROR: Bundle org.apache.karaf.features.core [9] Error starting
mvn:org.apache.karaf.features/org.apache.karaf.features.core/4.0.5
(org.osgi.framework.BundleException: Unable to resolve
org.apache.karaf.features.core [9](R 9.0): missing requirement
[org.apache.karaf.features.core [9](R 9.0)] osgi.wiring.package;
(&(osgi.wiring.package=org.ops4j.pax.url.mvn)(version>=2.4.0)(!(version>=3.0.0)))
Unresolved requirements: [[org.apache.karaf.features.core [9](R 9.0)]
osgi.wiring.package;
(&(osgi.wiring.package=org.ops4j.pax.url.mvn)(version>=2.4.0)(!(version>=3.0.0)))])
org.osgi.framework.BundleException: Unable to resolve
org.apache.karaf.features.core [9](R 9.0): missing requirement
[org.apache.karaf.features.core [9](R 9.0)] osgi.wiring.package;
(&(osgi.wiring.package=org.ops4j.pax.url.mvn)(version>=2.4.0)(!(version>=3.0.0)))
Unresolved requirements: [[org.apache.karaf.features.core [9](R 9.0)]
osgi.wiring.package;
(&(osgi.wiring.package=org.ops4j.pax.url.mvn)(version>=2.4.0)(!(version>=3.0.0)))]
at
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)
at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:745)

..and the following error messages if I do NOT put the
NTEventLogAppender.amd64.dll in the %KARAF_HOME%\lib directory:

2016-07-01 09:14:04,105 | 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=12,
bundle=6/mvn:org.ops4j.pax.logging/pax-logging-service/1.8.1]: 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.(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.1]
at
org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:123)[6:org.ops4j.pax.logging.pax-logging-service:1.8.1]
at
org.apache.log4j.PaxLoggingConfigurator.parseAppender(PaxLoggingConfigurator.java:97)[6:org.ops4j.pax.logging.pax-logging-service:1.8.1]
at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)[6:org.ops4j.pax.logging.pax-logging-service:1.8.1]
at
org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:639)[6:org.ops4j.pax.logging.pax-logging-service:1.8.1]
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:504)[6:org.ops4j.pax.logging.pax-logging-service:1.8.1]
at
org.apache.log4j.PaxLoggingConfigurator.doConfigure(PaxLoggingConfigurator.java:72)[6:org.ops4j.pax.logging.pax-logging-service:1.8.1]
at
org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl.updated(PaxLoggingServiceImpl.java:214)[6:org.ops4j.pax.logging.pax-logging-service:1.8.1]
at
org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl$1ManagedPaxLoggingService.updated(PaxLoggingServiceImpl.java:362)[6:org.ops4j.pax.logging.pax-logging-service:1.8.1]
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]

Re: Log4j NTEventLogAppender in Karaf 4.0.5

2016-07-01 Thread Bengt Rodehav
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 :

> 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 :
>
>> 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é :
>>
>>> 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 >:


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

 

Re: Log4j NTEventLogAppender in Karaf 4.0.5

2016-06-30 Thread Achim Nierbeck
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 :

> 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é :
>
>> 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 >> >:
>>>
>>>
>>> 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.(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
>>>
>>> 

Re: Log4j NTEventLogAppender in Karaf 4.0.5

2016-06-30 Thread Bengt Rodehav
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é :

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

Re: Log4j NTEventLogAppender in Karaf 4.0.5

2016-06-30 Thread Jean-Baptiste Onofré

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

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


Re: Log4j NTEventLogAppender in Karaf 4.0.5

2016-06-30 Thread Bengt Rodehav
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 :

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


Re: Log4J v2

2013-06-13 Thread Andreas Pieber
Hey,

The question would rather be:

Does pax-logging support log4jv2 and AFAIK the answer is no. The question
would be: how difficult can it be to add log4j v2 support to pax-logging :-)

Kind regards,
Andreas


On Thu, Jun 13, 2013 at 3:50 PM, CLEMENT Jean-Philippe 
jean-philippe.clem...@fr.thalesgroup.com wrote:

 Dear Karaf Team,

 I would like to know if Karaf (v3) supports Log4J v2?

 Cheers,
 JP

 [@@ OPEN @@]






RE: Log4J v2

2013-06-13 Thread CLEMENT Jean-Philippe
Thanks for the info.

Is PAX logging part of Felix ?

JP

[@@ OPEN @@]

De : Andreas Pieber [mailto:anpie...@gmail.com]
Envoyé : jeudi 13 juin 2013 15:56
À : Apache Karaf
Objet : Re: Log4J v2

Hey,

The question would rather be:

Does pax-logging support log4jv2 and AFAIK the answer is no. The question would 
be: how difficult can it be to add log4j v2 support to pax-logging :-)

Kind regards,
Andreas

On Thu, Jun 13, 2013 at 3:50 PM, CLEMENT Jean-Philippe 
jean-philippe.clem...@fr.thalesgroup.commailto:jean-philippe.clem...@fr.thalesgroup.com
 wrote:
Dear Karaf Team,

I would like to know if Karaf (v3) supports Log4J v2?

Cheers,
JP

[@@ OPEN @@]





Re: Log4J v2

2013-06-13 Thread Achim Nierbeck
Hi,

no it's not.
https://ops4j1.jira.com/wiki/display/paxlogging/Pax+Logging

regards, Achim


2013/6/13 CLEMENT Jean-Philippe jean-philippe.clem...@fr.thalesgroup.com

 Thanks for the info.

 ** **

 Is PAX logging part of Felix ?

 ** **

 JP

 ** **

 [@@ OPEN @@]

 ** **

 *De :* Andreas Pieber [mailto:anpie...@gmail.com]
 *Envoyé :* jeudi 13 juin 2013 15:56
 *À :* Apache Karaf
 *Objet :* Re: Log4J v2

 ** **

 Hey,

 ** **

 The question would rather be:

 ** **

 Does pax-logging support log4jv2 and AFAIK the answer is no. The question
 would be: how difficult can it be to add log4j v2 support to pax-logging :-)
 

 ** **

 Kind regards,

 Andreas

 ** **

 On Thu, Jun 13, 2013 at 3:50 PM, CLEMENT Jean-Philippe 
 jean-philippe.clem...@fr.thalesgroup.com wrote:

 Dear Karaf Team,

 I would like to know if Karaf (v3) supports Log4J v2?

 Cheers,
 JP

 [@@ OPEN @@]


 

 ** **




-- 

Apache Karaf http://karaf.apache.org/ Committer  PMC
OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer 
Project Lead
OPS4J Pax for Vaadin http://team.ops4j.org/wiki/display/PAXVAADIN/Home
Commiter  Project Lead
blog http://notizblog.nierbeck.de/


Re: log4j

2012-05-04 Thread Guillaume Nodet
That's really the best thing to do in karaf, as the log configuration is
handled in an osgi way, so no code should try to directly configure the
logging framework.

On Fri, May 4, 2012 at 1:01 PM, maaruks maris.orbid...@gmail.com wrote:


 Achim Nierbeck wrote
 
  I'm not sure what you are trying to do, but log4j as slf4j and a
  couple more logging framworks are supported by Karaf.
 

 I am migrating some code to karaf.It turns out Pax Logging doesn't
 allow
 to access all log4j classes.
 I removed code that is trying to access Appender.  Problem solved.


 --
 View this message in context:
 http://karaf.922171.n3.nabble.com/log4j-tp3958839p3961902.html
 Sent from the Karaf - User mailing list archive at Nabble.com.




-- 

Guillaume Nodet

Blog: http://gnodet.blogspot.com/

FuseSource, Integration everywhere
http://fusesource.com


Re: log4j

2012-05-03 Thread Achim Nierbeck
I'm not sure what you are trying to do, but log4j as slf4j and a
couple more logging framworks are supported by Karaf.
We use Pax Logging for this, log4j is even the underlying
implementation for logging.
If you want to use your own appenders you need to take special care for this.

Regards, Achim

2012/5/3 maaruks maris.orbid...@gmail.com:
 Is it possible to use log4j in karaf ?

 I have log4j classes in my bundle but I cant access them:

        try {
            Class? aClass = Class.forName(org.apache.log4j.Appender);
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }



 java.lang.RuntimeException: java.lang.ClassNotFoundException:
 org.apache.log4j.Appender not found by org.ops4j.pax.logging.pax-logging-api
 [4]
 ...
 Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Appender not
 found by org.ops4j.pax.logging.pax-logging-api [4]
    at
 org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
    at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
    at
 org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
    at
 org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:645)
    at
 org.apache.felix.framework.resolver.WireImpl.getClass(WireImpl.java:99)
    at
 org.apache.felix.framework.ModuleImpl.searchImports(ModuleImpl.java:1390)
    at
 org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:722)
    at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
    at
 org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
    at java.lang.Class.forName0(Native Method)[:1.6.0_26]
    at java.lang.Class.forName(Class.java:169)[:1.6.0_26]


 --
 View this message in context: 
 http://karaf.922171.n3.nabble.com/log4j-tp3958839.html
 Sent from the Karaf - User mailing list archive at Nabble.com.



-- 

Apache Karaf http://karaf.apache.org/ Committer  PMC
OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/
Committer  Project Lead
OPS4J Pax Vaadin http://team.ops4j.org/wiki/display/PAXVAADIN/Home
Commiter  Project Lead
blog http://notizblog.nierbeck.de/


Re: log4j

2012-05-03 Thread Guillaume Nodet
Custom appenders can be deployed by using fragments attached to the
pax-logging-service bundle fwiw.

On Thu, May 3, 2012 at 1:21 PM, Achim Nierbeck bcanh...@googlemail.comwrote:

 I'm not sure what you are trying to do, but log4j as slf4j and a
 couple more logging framworks are supported by Karaf.
 We use Pax Logging for this, log4j is even the underlying
 implementation for logging.
 If you want to use your own appenders you need to take special care for
 this.

 Regards, Achim

 2012/5/3 maaruks maris.orbid...@gmail.com:
  Is it possible to use log4j in karaf ?
 
  I have log4j classes in my bundle but I cant access them:
 
 try {
 Class? aClass = Class.forName(org.apache.log4j.Appender);
 } catch (ClassNotFoundException e) {
 throw new RuntimeException(e);
 }
 
 
 
  java.lang.RuntimeException: java.lang.ClassNotFoundException:
  org.apache.log4j.Appender not found by
 org.ops4j.pax.logging.pax-logging-api
  [4]
  ...
  Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Appender
 not
  found by org.ops4j.pax.logging.pax-logging-api [4]
 at
 
 org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
 at
 org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
 at
 
 org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
 at
 
 org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:645)
 at
  org.apache.felix.framework.resolver.WireImpl.getClass(WireImpl.java:99)
 at
  org.apache.felix.framework.ModuleImpl.searchImports(ModuleImpl.java:1390)
 at
 
 org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:722)
 at
 org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
 at
 
 org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
 at java.lang.Class.forName0(Native Method)[:1.6.0_26]
 at java.lang.Class.forName(Class.java:169)[:1.6.0_26]
 
 
  --
  View this message in context:
 http://karaf.922171.n3.nabble.com/log4j-tp3958839.html
  Sent from the Karaf - User mailing list archive at Nabble.com.



 --

 Apache Karaf http://karaf.apache.org/ Committer  PMC
 OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/
 Committer  Project Lead
 OPS4J Pax Vaadin http://team.ops4j.org/wiki/display/PAXVAADIN/Home
 Commiter  Project Lead
 blog http://notizblog.nierbeck.de/




-- 

Guillaume Nodet

Blog: http://gnodet.blogspot.com/

FuseSource, Integration everywhere
http://fusesource.com