Karaf 4.2.7 and PaxLogging/Knopflerfish

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Karaf 4.2.7 and PaxLogging/Knopflerfish

j3rem1e
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

Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

jbonofre
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
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

j3rem1e
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 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

rkmoquin
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 <[hidden email]> 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 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

Benjamin Graf
In reply to this post by j3rem1e
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" <[hidden email]>:
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 <[hidden email]> 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.

signature.asc (541 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

j3rem1e
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 <[hidden email]> 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" <[hidden email]>:
> >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 <[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

João Assunção
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

Mobile: +351 916968984
Phone: +351 211933149




On Fri, Oct 4, 2019 at 9:03 AM J. Brebec <[hidden email]> 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 <[hidden email]> 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" <[hidden email]>:
> >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 <[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

jbonofre
In reply to this post by j3rem1e
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 <[hidden email]> 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" <[hidden email]>:
>>> 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 <[hidden email]> 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é
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

j3rem1e
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é <[hidden email]> 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 <[hidden email]> 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" <[hidden email]>:
> >>> 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 <[hidden email]> 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é
> [hidden email]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

jbonofre
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é <[hidden email]> 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 <[hidden email]> 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" <[hidden email]>:
>>>>> 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 <[hidden email]> 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é
>> [hidden email]
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

Benjamin Graf
In reply to this post by j3rem1e
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 <[hidden email]> 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" <[hidden email]>:
>>> 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 <[hidden email]> 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.


signature.asc (566 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

Benjamin Graf
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 <[hidden email]> 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" <[hidden email]>:
>>>> 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 <[hidden email]> 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.


signature.asc (566 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.7 and PaxLogging/Knopflerfish

maggu2810
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