We should pax-web-api 7.3.x should upgrade osgi.context version to 1.1 to be R7 
compliant.

https://blog.osgi.org/2018/05/osgi-r7-highlights-http-whiteboard.html 
<https://blog.osgi.org/2018/05/osgi-r7-highlights-http-whiteboard.html>

Regards
JB

> Le 20 mai 2021 à 17:10, Steinar Bang <[email protected]> a écrit :
> 
>>>>>> Jean-Baptiste Onofre <[email protected]>:
> 
>> The scope has an impact on the maven-bundle-plugin. In your case, it
>> seems that the org.osgi.service.http.context package is not found.
> 
> Yes, I saw that.  Didn't understand why, though.
> 
>> Did you check the version range and the MANIFEST,
> 
> Ah, I said the manifests were identical, but in fact they aren't (I just
> skimmed them visually and looked at the byte count. My bad!)
> 
> Here's the diff from working (without the dependency) and non-working
> (with the dependency):
> 2c2
> < Bnd-LastModified: 1621448235589
> ---
>> Bnd-LastModified: 1621447336157
> 23c23
> <  sgi.service.http.context;version="[1.0,2)"
> ---
>> sgi.service.http.context;version="[1.1,2)"
> 
> So you were correct: it's the version that is different (1.1 as the
> lowest version instead of 1.0).
> 
>> and also if the org.osgi.service.http.context package is not embedded
>> in your bundle ?
> 
> No the package is not embedded in my bundle.  Should it be?
> Where is org.osgi.service.http.context supposed to come from?
> 
> Hm... it does look like something that should be provided by the OSGi
> framework...?  What version(s) do karaf 4.3.0 and 4.3.2 provide?
> 
> Hm... looks like something provided by pax-web...?
> karaf@root()> package:exports | grep org.osgi.service.http.context
> org.osgi.service.http.context            x 1.0.0       x 169 x 
> org.ops4j.pax.web.pax-web-api
> karaf@root()>
> 
> And it looks like the version provided is 1.0.0, which is too old...?
> (this is on karaf 4.3.2, from the binary tgz)
> 
> But why did this happen here?  This is the third project I'm taking up
> to OSGi 7 web whiteboard and I didn't encounter this in the other two.
> 
> Also, this is the only one of three bundles with web whiteboard services
> that triggers the issue.
> 
> This is the bundle that holds the web context helper and the shiro
> filter.
> 
> Maybe the web context helper is the cause of the problem?
> 
>> Does it occur outside of the test, at runtime ?
> 
> If by "it" you mean the load issue, then yes it does.
> 
> I get the same error when trying to load the same feature from the karaf
> 4.3.2 command line (haven't gone back to 4.3.0, but I expect the same
> behaviour there.  The karaf of the pax exam test is 4.3.0).
> 
> Thanks!
> 
> 
> - Steinar
> 

Reply via email to