You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Steinar Bang <sb...@dod.no> on 2022/07/15 11:04:03 UTC

Logging service 1.5.0 not exported in karaf 4.4.1 (Was: Building with the karaf 4.4.0 BOM: missing osgi.cmpn)

>>>>> Jean-Baptiste Onofré <jb...@nanthrax.net>:

> On Wed, May 25, 2022 at 5:02 PM Steinar Bang <sb...@dod.no> wrote:

>> >>>>> Jean-Baptiste Onofré <jb...@nanthrax.net>:

>>> OSGi R8 (https://docs.osgi.org/javadoc/osgi.core/8.0.0/) defined
>>> org.osgi.service.log 1.5.0. However, for backward compatibility,
>>> pax-logging still uses org.osgi.service.log 1.4.0.  So, either you
>>> extend the import version range to include 1.4.0 (it's what we did
>>> internally in Karaf), or we can add 1.5.0 export in pax-logging.

>> I'd say add 1.5.0 export in pax-logging.

>> My assumption is that the versions picked by the karaf BOM should work
>> out of the box.

>> But for now I'll extend the range to include 1.4.0.

> Fair enough, I will create a Jira/issue about that.

Karaf 4.4.1 still seems to be only exporting logging service 1.4.0.

I bumped the karaf BOM to 4.4.1 and rebuilt and everything went fine.

I then removed the explicit logging service 1.4.0 imports from the
maven-bundle-plugin configs and rebuilt with "mvn clean install", and
then my app failed in the pax exam test:
 https://gist.github.com/steinarb/4ac22fb118e6bca3170971c6d1443b1a


Re: Logging service 1.5.0 not exported in karaf 4.4.1

Posted by Steinar Bang <sb...@dod.no>.
>>>>> Jean-Baptiste Onofré <jb...@nanthrax.net>:

> My bad, I forgot to include this change in Pax logging for Karaf
> 4.4.1. I will tackle Pax Logging issue #410 asap.

Thanks JB!


- Steinar


Re: Logging service 1.5.0 not exported in karaf 4.4.2

Posted by Steinar Bang <sb...@dod.no>.
>>>>> Jean-Baptiste Onofré <jb...@nanthrax.net>:

> Hi Steinar,
> My bad, I forgot to include it in 4.4.2. Can you please create a Jira
> about that ? I will submit 4.4.3 to vote soon including this.

Here it is:
 https://issues.apache.org/jira/browse/KARAF-7605

And thanks! :-)


Re: Logging service 1.5.0 not exported in karaf 4.4.2 (Was: Logging service 1.5.0 not exported in karaf 4.4.1)

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

My bad, I forgot to include it in 4.4.2. Can you please create a Jira
about that ? I will submit 4.4.3 to vote soon including this.

Regards
JB

On Fri, Nov 4, 2022 at 8:00 PM Steinar Bang <sb...@dod.no> wrote:
>
> >>>>> Jean-Baptiste Onofré <jb...@nanthrax.net>:
>
> > My bad, I forgot to include this change in Pax logging for Karaf
> > 4.4.1. I will tackle Pax Logging issue #410 asap.
>
> Hm... this is still an issue in the karaf 4.4.2 BOM.
>
> Recap: Using the karaf BOM I get an org.osgi.service.log with 1.5.0 as
> the lower bound, while karaf offers up org.osgi.service.log with 1.5.0,
> so without manually adjusting the org.osgi.service.log import in the
> maven-bundle-plugin I get this error:
>
>  Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve user-admin-with-testdb/0.0.0: missing requirement [user-admin-with-testdb/0.0.0] osgi.identity; osgi.identity=authservice-user-admin; type=karaf.feature [caused by: Unable to resolve authservice-user-admin/0.0.0: missing requirement [authservice-user-admin/0.0.0] osgi.identity; osgi.identity=authservice-user-management-frontend; type=karaf.feature [caused by: Unable to resolve authservice-user-management-frontend/1.14.7.SNAPSHOT: missing requirement [authservice-user-management-frontend/1.14.7.SNAPSHOT] osgi.identity; osgi.identity=no.priv.bang.authservice.web.users.frontend; type=osgi.bundle; version="[1.14.7.SNAPSHOT,1.14.7.SNAPSHOT]"; resolution:=mandatory [caused by: Unable to resolve no.priv.bang.authservice.web.users.frontend/1.14.7.SNAPSHOT: missing requirement [no.priv.bang.authservice.web.users.frontend/1.14.7.SNAPSHOT] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.osgi.service.log)(version>=1.5.0)(!(version>=2.0.0)))"]]]
>         at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341)
>         ... 12 more
>
>
> @JB: should I make a Jira for this so it won't be forgotten for karaf 4.4.3?
>
> For the time being, I'll continue with this workaround:
>  https://github.com/steinarb/bang-bompom/blob/d236b137426e95ce5d7c30675dc0b5c10589332f/bang-pom/pom.xml#L89
>

Logging service 1.5.0 not exported in karaf 4.4.2 (Was: Logging service 1.5.0 not exported in karaf 4.4.1)

Posted by Steinar Bang <sb...@dod.no>.
>>>>> Jean-Baptiste Onofré <jb...@nanthrax.net>:

> My bad, I forgot to include this change in Pax logging for Karaf
> 4.4.1. I will tackle Pax Logging issue #410 asap.

Hm... this is still an issue in the karaf 4.4.2 BOM.

Recap: Using the karaf BOM I get an org.osgi.service.log with 1.5.0 as
the lower bound, while karaf offers up org.osgi.service.log with 1.5.0,
so without manually adjusting the org.osgi.service.log import in the
maven-bundle-plugin I get this error:

 Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve user-admin-with-testdb/0.0.0: missing requirement [user-admin-with-testdb/0.0.0] osgi.identity; osgi.identity=authservice-user-admin; type=karaf.feature [caused by: Unable to resolve authservice-user-admin/0.0.0: missing requirement [authservice-user-admin/0.0.0] osgi.identity; osgi.identity=authservice-user-management-frontend; type=karaf.feature [caused by: Unable to resolve authservice-user-management-frontend/1.14.7.SNAPSHOT: missing requirement [authservice-user-management-frontend/1.14.7.SNAPSHOT] osgi.identity; osgi.identity=no.priv.bang.authservice.web.users.frontend; type=osgi.bundle; version="[1.14.7.SNAPSHOT,1.14.7.SNAPSHOT]"; resolution:=mandatory [caused by: Unable to resolve no.priv.bang.authservice.web.users.frontend/1.14.7.SNAPSHOT: missing requirement [no.priv.bang.authservice.web.users.frontend/1.14.7.SNAPSHOT] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.osgi.service.log)(version>=1.5.0)(!(version>=2.0.0)))"]]]
 	at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341)
  	... 12 more


@JB: should I make a Jira for this so it won't be forgotten for karaf 4.4.3?

For the time being, I'll continue with this workaround:
 https://github.com/steinarb/bang-bompom/blob/d236b137426e95ce5d7c30675dc0b5c10589332f/bang-pom/pom.xml#L89


Re: Logging service 1.5.0 not exported in karaf 4.4.1 (Was: Building with the karaf 4.4.0 BOM: missing osgi.cmpn)

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
My bad, I forgot to include this change in Pax logging for Karaf
4.4.1. I will tackle Pax Logging issue #410 asap.

Regards
JB

On Fri, Jul 15, 2022 at 1:33 PM Grzegorz Grzybek <gr...@gmail.com> wrote:
>
> Hello
>
> There's (still) unresolved https://github.com/ops4j/org.ops4j.pax.logging/issues/410 issue. And yes - Pax Logging exports at most version 1.4 because there were no big reasons to bump this version... However I agree that users with org.osgi.service.log 1.5 on the classpath will have "[1.5,2)" generated by maven-bundle-plugin...
>
> regards
> Grzegorz Grzybek
>
> pt., 15 lip 2022 o 13:04 Steinar Bang <sb...@dod.no> napisał(a):
>>
>> >>>>> Jean-Baptiste Onofré <jb...@nanthrax.net>:
>>
>> > On Wed, May 25, 2022 at 5:02 PM Steinar Bang <sb...@dod.no> wrote:
>>
>> >> >>>>> Jean-Baptiste Onofré <jb...@nanthrax.net>:
>>
>> >>> OSGi R8 (https://docs.osgi.org/javadoc/osgi.core/8.0.0/) defined
>> >>> org.osgi.service.log 1.5.0. However, for backward compatibility,
>> >>> pax-logging still uses org.osgi.service.log 1.4.0.  So, either you
>> >>> extend the import version range to include 1.4.0 (it's what we did
>> >>> internally in Karaf), or we can add 1.5.0 export in pax-logging.
>>
>> >> I'd say add 1.5.0 export in pax-logging.
>>
>> >> My assumption is that the versions picked by the karaf BOM should work
>> >> out of the box.
>>
>> >> But for now I'll extend the range to include 1.4.0.
>>
>> > Fair enough, I will create a Jira/issue about that.
>>
>> Karaf 4.4.1 still seems to be only exporting logging service 1.4.0.
>>
>> I bumped the karaf BOM to 4.4.1 and rebuilt and everything went fine.
>>
>> I then removed the explicit logging service 1.4.0 imports from the
>> maven-bundle-plugin configs and rebuilt with "mvn clean install", and
>> then my app failed in the pax exam test:
>>  https://gist.github.com/steinarb/4ac22fb118e6bca3170971c6d1443b1a
>>

Re: Logging service 1.5.0 not exported in karaf 4.4.1

Posted by Steinar Bang <sb...@dod.no>.
>>>>> Steinar Bang <sb...@dod.no>:

> Hm... but maybe I can override the org.osgi.service.log version set by
> the BOM?

Nope.  Tried that, didn't work.

> And maybe I should move the import config of maven-bundle-plugin to
> plugin mangement in the parent POM?

But this, on the other hand, worked.

<configuration> content is mixed with existing <configuration> content
where maven-bundle-plugin is actually used.

So the <Import-Package> is added to whatever is there already.

> Both would give me less pom config.

The working one gives less config.

> Overriding the org.osgi.service.log version set by the BOM would be the
> simplest solution, if possible.

But unfortunately didn't work

> (But ideally it should work out the box)

Yep.


Re: Logging service 1.5.0 not exported in karaf 4.4.1

Posted by Steinar Bang <sb...@dod.no>.
>>>>> Grzegorz Grzybek <gr...@gmail.com>:

> Hello
> There's (still) unresolved
> https://github.com/ops4j/org.ops4j.pax.logging/issues/410 issue. And yes -
> Pax Logging exports at most version 1.4 because there were no big reasons
> to bump this version... However I agree that users with
> org.osgi.service.log 1.5 on the classpath will have "[1.5,2)" generated by
> maven-bundle-plugin...

The issue was that the karaf 4.4.0 and 4.4.1 BOM will pull in logservice
1.5.0, and my expectation of a BOM is that things should work out of the
box.

So IMO either the BOM should be changed or karaf should be changed to
offer up both version 1.4.0 and 1.5.0 of org.osgi.service.log.

Hm... but maybe I can override the org.osgi.service.log version set by
the BOM?

And maybe I should move the import config of maven-bundle-plugin to
plugin mangement in the parent POM?

Both would give me less pom config.

Overriding the org.osgi.service.log version set by the BOM would be the
simplest solution, if possible.

(But ideally it should work out the box)


Re: Logging service 1.5.0 not exported in karaf 4.4.1 (Was: Building with the karaf 4.4.0 BOM: missing osgi.cmpn)

Posted by Grzegorz Grzybek <gr...@gmail.com>.
Hello

There's (still) unresolved
https://github.com/ops4j/org.ops4j.pax.logging/issues/410 issue. And yes -
Pax Logging exports at most version 1.4 because there were no big reasons
to bump this version... However I agree that users with
org.osgi.service.log 1.5 on the classpath will have "[1.5,2)" generated by
maven-bundle-plugin...

regards
Grzegorz Grzybek

pt., 15 lip 2022 o 13:04 Steinar Bang <sb...@dod.no> napisał(a):

> >>>>> Jean-Baptiste Onofré <jb...@nanthrax.net>:
>
> > On Wed, May 25, 2022 at 5:02 PM Steinar Bang <sb...@dod.no> wrote:
>
> >> >>>>> Jean-Baptiste Onofré <jb...@nanthrax.net>:
>
> >>> OSGi R8 (https://docs.osgi.org/javadoc/osgi.core/8.0.0/) defined
> >>> org.osgi.service.log 1.5.0. However, for backward compatibility,
> >>> pax-logging still uses org.osgi.service.log 1.4.0.  So, either you
> >>> extend the import version range to include 1.4.0 (it's what we did
> >>> internally in Karaf), or we can add 1.5.0 export in pax-logging.
>
> >> I'd say add 1.5.0 export in pax-logging.
>
> >> My assumption is that the versions picked by the karaf BOM should work
> >> out of the box.
>
> >> But for now I'll extend the range to include 1.4.0.
>
> > Fair enough, I will create a Jira/issue about that.
>
> Karaf 4.4.1 still seems to be only exporting logging service 1.4.0.
>
> I bumped the karaf BOM to 4.4.1 and rebuilt and everything went fine.
>
> I then removed the explicit logging service 1.4.0 imports from the
> maven-bundle-plugin configs and rebuilt with "mvn clean install", and
> then my app failed in the pax exam test:
>  https://gist.github.com/steinarb/4ac22fb118e6bca3170971c6d1443b1a
>
>