You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by "J. Brebec" <je...@gmail.com> on 2019/10/03 08:55:32 UTC

Karaf 4.2.7 and PaxLogging/Knopflerfish

Hello,

I am upgrading my applications from Karaf 4.2.6 to Karaf 4.2.7

However, Karaf have now a new dependencies to org.knopflerfish.kf6:log-API:jar:5.0.0 and this artefact is not available from maven central. I am behind a corporate filrewall with strict policies and It will be difficult for me to add an exception to the knopflerfish private maven repository.

The depency path is framework (or static) -> pax-loggin-service -> log-API

Is it possible to remove this dependencies ? this jar doesn't seem to be used on runtime, only when building a custom distribution.

Regards,
Jérémie


Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

Posted by Ryan Moquin <fr...@gmail.com>.
Yeah, I saw that as well.  I had to add the Knopflerfish maven repo to our
corporate maven repository so I could get the dependencies downloaded.
When it failed it showed it as a dependency of pax-logging.  I was
surprised how many dependencies there are for pax-logging.

Ryan

On Thu, Oct 3, 2019 at 7:59 AM J. Brebec <je...@gmail.com> wrote:

> Thanks.
>
> It's probably related to the upgrade to pax-logging too, but when I launch
> Karaf 4.2.7 (on windows), there is a System.println visibile in the console
> :
>
> org.ops4j.pax.url.wrap
> [org.ops4j.pax.url.commons.handler.HandlerActivator] DEBUG : Handler for
> protocols [wrap] started
>
>
> On 2019/10/03 09:10:43, jbonofre <jb...@nanthrax.net> wrote:
> > Let me take a look. It's probably a side effect of pax-logging 1.11
> update.
> >
> > I keep you posted.
> >
> > Regards
> > JB
> >
> >
> >
> > --
> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> >
>

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

Posted by João Assunção <jo...@exploitsys.com>.
I had the same issue.

Adding an exclusion to the framework dependency fixed it for me.

<dependency>
      <groupId>org.apache.karaf.features</groupId>
      <artifactId>framework</artifactId>
      <type>kar</type>
      <exclusions>
 <exclusion>
     <groupId>org.knopflerfish.kf6</groupId>
     <artifactId>log-API</artifactId>
 </exclusion>
      </exclusions>
</dependency>

João Assunção

Email: joao.assuncao@exploitsys.com
Mobile: +351 916968984
Phone: +351 211933149
Web: www.exploitsys.com




On Fri, Oct 4, 2019 at 9:03 AM J. Brebec <je...@gmail.com> wrote:

> Do you remember the name of the property or where I should look ? I didn't
> see anything on this suject in the release note of pax logging.
>
> Thanks
>
> On 2019/10/03 18:01:24, Benjamin Graf <be...@gmx.net> wrote:
> > If I remember right there is a new option to be set since pax-logging
> 1.11.
> >
> > Might not be set yet in Karaf 4.2.7
> >
> > Regards
> > Benjamin
> >
> > Am 3. Oktober 2019 13:59:01 MESZ schrieb "J. Brebec" <
> jeremie.brebec@gmail.com>:
> > >Thanks.
> > >
> > >It's probably related to the upgrade to pax-logging too, but when I
> > >launch Karaf 4.2.7 (on windows), there is a System.println visibile in
> > >the console :
> > >
> > >org.ops4j.pax.url.wrap
> > >[org.ops4j.pax.url.commons.handler.HandlerActivator] DEBUG : Handler
> > >for protocols [wrap] started
> > >
> > >
> > >On 2019/10/03 09:10:43, jbonofre <jb...@nanthrax.net> wrote:
> > >> Let me take a look. It's probably a side effect of pax-logging 1.11
> > >update.
> > >>
> > >> I keep you posted.
> > >>
> > >> Regards
> > >> JB
> > >>
> > >>
> > >>
> > >> --
> > >> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> > >>
> >
> > --
> > Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
>

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Agree about the optional, but it could head to a refresh, so I would
like to check.

I keep you posted.

Regards
JB

On 04/10/2019 11:38, J. Brebec wrote:
> Pax Logging using Knopflerfish is not new, however the jar is required only since v1.11 of pax logging (it has been introduced in PAXLOGGING-252). The jar is not needed at runtime, because it's embedded into pax-logging.
> 
> In my opinion, the dependency should be marked as optional in the pom of pax-logging-service. Having a required dependency present only in a private maven repository cn be easily a bad experience for people like me behind a corporate proxy.
> 
> Do you know how to get ride of the println of the wrapper bundle ? This bundle is started before pax-logging and the default logger use System.println. It happens in custom distribution or when using the static framework.
> 
> Regards,
> Jérémie 
> 
> On 2019/10/04 08:23:28, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote: 
>> Hi,
>>
>> knoperfish dependency is in pax-logging-api and it's not new.
>>
>> The karaf-docker-example creates a distribution without problem because
>> I have the artifacts on my repo.
>>
>> The knopflerfish artifacts are not on Central anymore but on repo:
>>
>> https://www.knopflerfish.org/releases/5.0.0/maven2/
>>
>> If you add an exclusion in pom dependency it should work.
>>
>> I have two proposals here:
>>
>> 1. remove the dependency in pax-logging (but it could impact some users)
>> 2. add the bundle as "installed" to populate karaf system folder and not
>> go on remote repositories.
>>
>> Regards
>> JB
>>
>> On 04/10/2019 10:03, J. Brebec wrote:
>>> Do you remember the name of the property or where I should look ? I didn't see anything on this suject in the release note of pax logging.
>>>
>>> Thanks
>>>
>>> On 2019/10/03 18:01:24, Benjamin Graf <be...@gmx.net> wrote: 
>>>> If I remember right there is a new option to be set since pax-logging 1.11.
>>>>
>>>> Might not be set yet in Karaf 4.2.7
>>>>
>>>> Regards
>>>> Benjamin 
>>>>
>>>> Am 3. Oktober 2019 13:59:01 MESZ schrieb "J. Brebec" <je...@gmail.com>:
>>>>> Thanks.
>>>>>
>>>>> It's probably related to the upgrade to pax-logging too, but when I
>>>>> launch Karaf 4.2.7 (on windows), there is a System.println visibile in
>>>>> the console :
>>>>>
>>>>> org.ops4j.pax.url.wrap
>>>>> [org.ops4j.pax.url.commons.handler.HandlerActivator] DEBUG : Handler
>>>>> for protocols [wrap] started
>>>>>
>>>>>
>>>>> On 2019/10/03 09:10:43, jbonofre <jb...@nanthrax.net> wrote: 
>>>>>> Let me take a look. It's probably a side effect of pax-logging 1.11
>>>>> update.
>>>>>>
>>>>>> I keep you posted.
>>>>>>
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>>
>>>>
>>>> -- 
>>>> Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
>>
>> -- 
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

Posted by "J. Brebec" <je...@gmail.com>.
Pax Logging using Knopflerfish is not new, however the jar is required only since v1.11 of pax logging (it has been introduced in PAXLOGGING-252). The jar is not needed at runtime, because it's embedded into pax-logging.

In my opinion, the dependency should be marked as optional in the pom of pax-logging-service. Having a required dependency present only in a private maven repository cn be easily a bad experience for people like me behind a corporate proxy.

Do you know how to get ride of the println of the wrapper bundle ? This bundle is started before pax-logging and the default logger use System.println. It happens in custom distribution or when using the static framework.

Regards,
Jérémie 

On 2019/10/04 08:23:28, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote: 
> Hi,
> 
> knoperfish dependency is in pax-logging-api and it's not new.
> 
> The karaf-docker-example creates a distribution without problem because
> I have the artifacts on my repo.
> 
> The knopflerfish artifacts are not on Central anymore but on repo:
> 
> https://www.knopflerfish.org/releases/5.0.0/maven2/
> 
> If you add an exclusion in pom dependency it should work.
> 
> I have two proposals here:
> 
> 1. remove the dependency in pax-logging (but it could impact some users)
> 2. add the bundle as "installed" to populate karaf system folder and not
> go on remote repositories.
> 
> Regards
> JB
> 
> On 04/10/2019 10:03, J. Brebec wrote:
> > Do you remember the name of the property or where I should look ? I didn't see anything on this suject in the release note of pax logging.
> > 
> > Thanks
> > 
> > On 2019/10/03 18:01:24, Benjamin Graf <be...@gmx.net> wrote: 
> >> If I remember right there is a new option to be set since pax-logging 1.11.
> >>
> >> Might not be set yet in Karaf 4.2.7
> >>
> >> Regards
> >> Benjamin 
> >>
> >> Am 3. Oktober 2019 13:59:01 MESZ schrieb "J. Brebec" <je...@gmail.com>:
> >>> Thanks.
> >>>
> >>> It's probably related to the upgrade to pax-logging too, but when I
> >>> launch Karaf 4.2.7 (on windows), there is a System.println visibile in
> >>> the console :
> >>>
> >>> org.ops4j.pax.url.wrap
> >>> [org.ops4j.pax.url.commons.handler.HandlerActivator] DEBUG : Handler
> >>> for protocols [wrap] started
> >>>
> >>>
> >>> On 2019/10/03 09:10:43, jbonofre <jb...@nanthrax.net> wrote: 
> >>>> Let me take a look. It's probably a side effect of pax-logging 1.11
> >>> update.
> >>>>
> >>>> I keep you posted.
> >>>>
> >>>> Regards
> >>>> JB
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> >>>>
> >>
> >> -- 
> >> Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
> 

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

knoperfish dependency is in pax-logging-api and it's not new.

The karaf-docker-example creates a distribution without problem because
I have the artifacts on my repo.

The knopflerfish artifacts are not on Central anymore but on repo:

https://www.knopflerfish.org/releases/5.0.0/maven2/

If you add an exclusion in pom dependency it should work.

I have two proposals here:

1. remove the dependency in pax-logging (but it could impact some users)
2. add the bundle as "installed" to populate karaf system folder and not
go on remote repositories.

Regards
JB

On 04/10/2019 10:03, J. Brebec wrote:
> Do you remember the name of the property or where I should look ? I didn't see anything on this suject in the release note of pax logging.
> 
> Thanks
> 
> On 2019/10/03 18:01:24, Benjamin Graf <be...@gmx.net> wrote: 
>> If I remember right there is a new option to be set since pax-logging 1.11.
>>
>> Might not be set yet in Karaf 4.2.7
>>
>> Regards
>> Benjamin 
>>
>> Am 3. Oktober 2019 13:59:01 MESZ schrieb "J. Brebec" <je...@gmail.com>:
>>> Thanks.
>>>
>>> It's probably related to the upgrade to pax-logging too, but when I
>>> launch Karaf 4.2.7 (on windows), there is a System.println visibile in
>>> the console :
>>>
>>> org.ops4j.pax.url.wrap
>>> [org.ops4j.pax.url.commons.handler.HandlerActivator] DEBUG : Handler
>>> for protocols [wrap] started
>>>
>>>
>>> On 2019/10/03 09:10:43, jbonofre <jb...@nanthrax.net> wrote: 
>>>> Let me take a look. It's probably a side effect of pax-logging 1.11
>>> update.
>>>>
>>>> I keep you posted.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>>
>>>>
>>>> --
>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>
>>
>> -- 
>> Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

Posted by Markus Rathgeb <ma...@gmail.com>.
Hi,

shouldn't this be solved with Karaf 4.2.8?
Becuase of https://issues.apache.org/jira/projects/KARAF/issues/KARAF-6462?filter=allissues
I removed

<exclusions>
  <exclusion>
    <groupId>org.knopflerfish.kf6</groupId>
    <artifactId>log-API</artifactId>
  </exclusion>
</exclusions>

from my pom files after updating from 4.2.7 to 4.2.8.

Today I need to build a release.
I tried to trigger a Maven release of my custom distribution, that
also brings custom features and bundles.

The release build fails because of:

[INFO] [ERROR] Failed to execute goal on project runtime: Could not
resolve dependencies for project
my-group-id:my-artifact-id-of-a-feature:feature:x.y.z: Failed to
collect dependencies at
org.ops4j.pax.jdbc:pax-jdbc-features:xml:features:1.4.4 ->
org.apache.karaf.features:framework:kar:4.2.7 ->
org.ops4j.pax.logging:pax-logging-log4j2:jar:1.11.2 ->
org.knopflerfish.kf6:log-API:jar:5.0.0: Failed to read artifact
descriptor for org.knopflerfish.kf6:log-API:jar:5.0.0: Could not
transfer artifact org.knopflerfish.kf6:log-API:pom:5.0.0 from/to ...

Karaf 4.2.8 is using the Pax JDBC 1.4.4 feature.
Pax JDBC seems to depend on the 4.2.7 framework kar but misses the exclusion...

So it seems we need this exclusion also while using Karaf 4.2.8
(otherwise Karaf would need to add this exclusion while depending on
dependencies that brings it into the dependency chain again).

Best regards,
Markus

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

Posted by Benjamin Graf <be...@gmx.net>.
I found the reason. The property is set correctly to ERROR in Karaf but
the package is started at run level 8. The pax-url-wrap bundle is
started at run level 5 before the property for the fallback logger is
set to ERROR. This causes the fallback logger to log at default level
TRACE. Workaround might be to change run level of wrap to something
higher than 8. For plain Karaf 4.2.7 it does work with e.g. 10 but you
should't try to activate bundles with wrap with lower run level!

Regards

Benjamin

On 04.10.2019 16:07, Benjamin Graf wrote:
> I think it's "org.ops4j.pax.logging.DefaultServiceLog.level=ERROR" but
> not tried yet.
>
> Regards
>
> Benjamin
>
> On 04.10.2019 10:03, J. Brebec wrote:
>> Do you remember the name of the property or where I should look ? I didn't see anything on this suject in the release note of pax logging.
>>
>> Thanks
>>
>> On 2019/10/03 18:01:24, Benjamin Graf <be...@gmx.net> wrote: 
>>> If I remember right there is a new option to be set since pax-logging 1.11.
>>>
>>> Might not be set yet in Karaf 4.2.7
>>>
>>> Regards
>>> Benjamin 
>>>
>>> Am 3. Oktober 2019 13:59:01 MESZ schrieb "J. Brebec" <je...@gmail.com>:
>>>> Thanks.
>>>>
>>>> It's probably related to the upgrade to pax-logging too, but when I
>>>> launch Karaf 4.2.7 (on windows), there is a System.println visibile in
>>>> the console :
>>>>
>>>> org.ops4j.pax.url.wrap
>>>> [org.ops4j.pax.url.commons.handler.HandlerActivator] DEBUG : Handler
>>>> for protocols [wrap] started
>>>>
>>>>
>>>> On 2019/10/03 09:10:43, jbonofre <jb...@nanthrax.net> wrote: 
>>>>> Let me take a look. It's probably a side effect of pax-logging 1.11
>>>> update.
>>>>> I keep you posted.
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>>
>>> -- 
>>> Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.


Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

Posted by Benjamin Graf <be...@gmx.net>.
I think it's "org.ops4j.pax.logging.DefaultServiceLog.level=ERROR" but
not tried yet.

Regards

Benjamin

On 04.10.2019 10:03, J. Brebec wrote:
> Do you remember the name of the property or where I should look ? I didn't see anything on this suject in the release note of pax logging.
>
> Thanks
>
> On 2019/10/03 18:01:24, Benjamin Graf <be...@gmx.net> wrote: 
>> If I remember right there is a new option to be set since pax-logging 1.11.
>>
>> Might not be set yet in Karaf 4.2.7
>>
>> Regards
>> Benjamin 
>>
>> Am 3. Oktober 2019 13:59:01 MESZ schrieb "J. Brebec" <je...@gmail.com>:
>>> Thanks.
>>>
>>> It's probably related to the upgrade to pax-logging too, but when I
>>> launch Karaf 4.2.7 (on windows), there is a System.println visibile in
>>> the console :
>>>
>>> org.ops4j.pax.url.wrap
>>> [org.ops4j.pax.url.commons.handler.HandlerActivator] DEBUG : Handler
>>> for protocols [wrap] started
>>>
>>>
>>> On 2019/10/03 09:10:43, jbonofre <jb...@nanthrax.net> wrote: 
>>>> Let me take a look. It's probably a side effect of pax-logging 1.11
>>> update.
>>>> I keep you posted.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>>
>>>>
>>>> --
>>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>>
>> -- 
>> Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.


Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

Posted by "J. Brebec" <je...@gmail.com>.
Do you remember the name of the property or where I should look ? I didn't see anything on this suject in the release note of pax logging.

Thanks

On 2019/10/03 18:01:24, Benjamin Graf <be...@gmx.net> wrote: 
> If I remember right there is a new option to be set since pax-logging 1.11.
> 
> Might not be set yet in Karaf 4.2.7
> 
> Regards
> Benjamin 
> 
> Am 3. Oktober 2019 13:59:01 MESZ schrieb "J. Brebec" <je...@gmail.com>:
> >Thanks.
> >
> >It's probably related to the upgrade to pax-logging too, but when I
> >launch Karaf 4.2.7 (on windows), there is a System.println visibile in
> >the console :
> >
> >org.ops4j.pax.url.wrap
> >[org.ops4j.pax.url.commons.handler.HandlerActivator] DEBUG : Handler
> >for protocols [wrap] started
> >
> >
> >On 2019/10/03 09:10:43, jbonofre <jb...@nanthrax.net> wrote: 
> >> Let me take a look. It's probably a side effect of pax-logging 1.11
> >update.
> >> 
> >> I keep you posted.
> >> 
> >> Regards
> >> JB
> >> 
> >> 
> >> 
> >> --
> >> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> >> 
> 
> -- 
> Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

Posted by Benjamin Graf <be...@gmx.net>.
If I remember right there is a new option to be set since pax-logging 1.11.

Might not be set yet in Karaf 4.2.7

Regards
Benjamin 

Am 3. Oktober 2019 13:59:01 MESZ schrieb "J. Brebec" <je...@gmail.com>:
>Thanks.
>
>It's probably related to the upgrade to pax-logging too, but when I
>launch Karaf 4.2.7 (on windows), there is a System.println visibile in
>the console :
>
>org.ops4j.pax.url.wrap
>[org.ops4j.pax.url.commons.handler.HandlerActivator] DEBUG : Handler
>for protocols [wrap] started
>
>
>On 2019/10/03 09:10:43, jbonofre <jb...@nanthrax.net> wrote: 
>> Let me take a look. It's probably a side effect of pax-logging 1.11
>update.
>> 
>> I keep you posted.
>> 
>> Regards
>> JB
>> 
>> 
>> 
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>> 

-- 
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

Posted by "J. Brebec" <je...@gmail.com>.
Thanks.

It's probably related to the upgrade to pax-logging too, but when I launch Karaf 4.2.7 (on windows), there is a System.println visibile in the console :

org.ops4j.pax.url.wrap [org.ops4j.pax.url.commons.handler.HandlerActivator] DEBUG : Handler for protocols [wrap] started


On 2019/10/03 09:10:43, jbonofre <jb...@nanthrax.net> wrote: 
> Let me take a look. It's probably a side effect of pax-logging 1.11 update.
> 
> I keep you posted.
> 
> Regards
> JB
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

Posted by jbonofre <jb...@nanthrax.net>.
Let me take a look. It's probably a side effect of pax-logging 1.11 update.

I keep you posted.

Regards
JB



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html