Finally getting around to get this one done but facing a few issues and have a few questions.
First I started trying to go to version 8, but was having issues where in some places OSGi would resolve to version 10 instead of 9 (we have both since Eclipse help is on 10 and part of our app) even if my range max was < 10. But then I found out on the Jetty site that version 9 is EOL since 2022 and now even version 10 is EOL since January 1st. So that sealed the deal to go with version 10 at least.
This did bring some resolution issues with Servlet 3.1 vs Servlet 4 and still have one left to resolve. Wonder if anyone has great insight on best way to handle this, but I believe that I can get it done, even if some bundles have no range specified (and here again we can't get rid of 3.1 since used by some bundles).
Now for the tricky part that I just can't figure out. I am getting a resolution issue that seems to be from within pax web and I can't understand it. I am mostly (except 1 place where I can't) declaring my dependencies on osgi interface and just including the pax web bundles as part of my launch.
Here is the reported issue, where I have 3 cases where there appears to be conflicts resolving
'org.osgi.service.http.context', 2 that are pax web only and one involving Aries:
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.ops4j.pax.web.pax-web-runtime [509]
Unresolved requirement: Import-Package: org.jasypt.encryption; resolution:="optional"
Unresolved requirement: Import-Package: org.jasypt.encryption.pbe; resolution:="optional"
Unresolved requirement: Import-Package: org.jasypt.encryption.pbe.config; resolution:="optional"
Unresolved requirement: Import-Package: org.jasypt.commons; resolution:="optional"
Bundle was not resolved because of a uses constraint violation.
org.apache.felix.resolver.reason.ReasonException: Uses constraint violation. Unable to resolve resource org.ops4j.pax.web.pax-web-runtime [osgi.identity; osgi.identity="org.ops4j.pax.web.pax-web-runtime"; type="osgi.bundle"; version:Version="9.0.15"]
because it is exposed to package
'org.osgi.service.http.context' from resources
org.osgi.service.http.whiteboard [osgi.identity; osgi.identity="org.osgi.service.http.whiteboard"; type="osgi.bundle"; version:Version="1.1.1.202109301733"] and
org.ops4j.pax.web.pax-web-api [osgi.identity; osgi.identity="org.ops4j.pax.web.pax-web-api"; type="osgi.bundle"; version:Version="9.0.15"] via two dependency chains.
Chain 1:
org.ops4j.pax.web.pax-web-runtime [osgi.identity; osgi.identity="org.ops4j.pax.web.pax-web-runtime"; type="osgi.bundle"; version:Version="9.0.15"]
import: (&(osgi.wiring.package=org.osgi.service.http.context)(&(version>=1.1.0)(!(version>=2.0.0))))
|
export: osgi.wiring.package: org.osgi.service.http.context
org.osgi.service.http.whiteboard [osgi.identity; osgi.identity="org.osgi.service.http.whiteboard"; type="osgi.bundle"; version:Version="1.1.1.202109301733"]
Chain 2:
org.ops4j.pax.web.pax-web-runtime [osgi.identity; osgi.identity="org.ops4j.pax.web.pax-web-runtime"; type="osgi.bundle"; version:Version="9.0.15"]
import: (&(osgi.wiring.package=org.ops4j.pax.web.service.whiteboard)(version>=9.0.15))
|
export: osgi.wiring.package: org.ops4j.pax.web.service.whiteboard; uses:=org.osgi.service.http.context
export: osgi.wiring.package=org.osgi.service.http.context
org.ops4j.pax.web.pax-web-api [osgi.identity; osgi.identity="org.ops4j.pax.web.pax-web-api"; type="osgi.bundle"; version:Version="9.0.15"]
!ENTRY org.ops4j.pax.web.pax-web-extender-whiteboard 4 0 2024-03-15 07:25:16.520
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.ops4j.pax.web.pax-web-extender-whiteboard [639]
Bundle was not resolved because of a uses constraint violation.
org.apache.felix.resolver.reason.ReasonException: Uses constraint violation. Unable to resolve resource org.ops4j.pax.web.pax-web-extender-whiteboard [osgi.identity; osgi.identity="org.ops4j.pax.web.pax-web-extender-whiteboard"; type="osgi.bundle"; version:Version="9.0.15"] because it is exposed to package 'org.osgi.service.http.context' from resources org.osgi.service.http.whiteboard [osgi.identity; osgi.identity="org.osgi.service.http.whiteboard"; type="osgi.bundle"; version:Version="1.1.1.202109301733"] and org.ops4j.pax.web.pax-web-api [osgi.identity; osgi.identity="org.ops4j.pax.web.pax-web-api"; type="osgi.bundle"; version:Version="9.0.15"] via two dependency chains.
Chain 1:
org.ops4j.pax.web.pax-web-extender-whiteboard [osgi.identity; osgi.identity="org.ops4j.pax.web.pax-web-extender-whiteboard"; type="osgi.bundle"; version:Version="9.0.15"]
import: (&(osgi.wiring.package=org.osgi.service.http.context)(&(version>=1.1.0)(!(version>=2.0.0))))
|
export: osgi.wiring.package: org.osgi.service.http.context
org.osgi.service.http.whiteboard [osgi.identity; osgi.identity="org.osgi.service.http.whiteboard"; type="osgi.bundle"; version:Version="1.1.1.202109301733"]
Chain 2:
org.ops4j.pax.web.pax-web-extender-whiteboard [osgi.identity; osgi.identity="org.ops4j.pax.web.pax-web-extender-whiteboard"; type="osgi.bundle"; version:Version="9.0.15"]
import: (&(osgi.wiring.package=org.ops4j.pax.web.service.whiteboard)(version>=9.0.15))
|
export: osgi.wiring.package: org.ops4j.pax.web.service.whiteboard; uses:=org.osgi.service.http.context
export: osgi.wiring.package=org.osgi.service.http.context
org.ops4j.pax.web.pax-web-api [osgi.identity; osgi.identity="org.ops4j.pax.web.pax-web-api"; type="osgi.bundle"; version:Version="9.0.15"]
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.apache.aries.jax.rs.whiteboard [541]
Unresolved requirement: Require-Capability: osgi.implementation; filter:="(&(osgi.implementation=osgi.http)(version>=1.0.0)(!(version>=2.0.0)))"
-> Provide-Capability: osgi.implementation; version:Version="1.1.0"; osgi.implementation="osgi.http"; uses:="javax.servlet,javax.servlet.http,org.osgi.service.http.context,org.osgi.service.http.whiteboard"
org.ops4j.pax.web.pax-web-runtime [509]
Unresolved requirement: Import-Package: org.jasypt.encryption; resolution:="optional"
Unresolved requirement: Import-Package: org.jasypt.encryption.pbe; resolution:="optional"
Unresolved requirement: Import-Package: org.jasypt.encryption.pbe.config; resolution:="optional"
Unresolved requirement: Import-Package: org.jasypt.commons; resolution:="optional"
Bundle was not resolved because of a uses constraint violation.
org.apache.felix.resolver.reason.ReasonException: Uses constraint violation. Unable to resolve resource org.ops4j.pax.web.pax-web-runtime [osgi.identity; osgi.identity="org.ops4j.pax.web.pax-web-runtime"; type="osgi.bundle"; version:Version="9.0.15"]
because it is exposed to package
'org.osgi.service.http.context' from resources
org.osgi.service.http.whiteboard [osgi.identity; osgi.identity="org.osgi.service.http.whiteboard"; type="osgi.bundle"; version:Version="1.1.1.202109301733"] and
org.ops4j.pax.web.pax-web-api [osgi.identity; osgi.identity="org.ops4j.pax.web.pax-web-api"; type="osgi.bundle"; version:Version="9.0.15"] via two dependency chains.
Chain 1:
org.ops4j.pax.web.pax-web-runtime [osgi.identity; osgi.identity="org.ops4j.pax.web.pax-web-runtime"; type="osgi.bundle"; version:Version="9.0.15"]
import: (&(osgi.wiring.package=org.osgi.service.http.context)(&(version>=1.1.0)(!(version>=2.0.0))))
|
export: osgi.wiring.package: org.osgi.service.http.context
org.osgi.service.http.whiteboard [osgi.identity; osgi.identity="org.osgi.service.http.whiteboard"; type="osgi.bundle"; version:Version="1.1.1.202109301733"]
Chain 2:
org.ops4j.pax.web.pax-web-runtime [osgi.identity; osgi.identity="org.ops4j.pax.web.pax-web-runtime"; type="osgi.bundle"; version:Version="9.0.15"]
import: (&(osgi.wiring.package=org.ops4j.pax.web.service.whiteboard)(version>=9.0.15))
|
export: osgi.wiring.package: org.ops4j.pax.web.service.whiteboard; uses:=org.osgi.service.http.context
export: osgi.wiring.package=org.osgi.service.http.context
org.ops4j.pax.web.pax-web-api [osgi.identity; osgi.identity="org.ops4j.pax.web.pax-web-api"; type="osgi.bundle"; version:Version="9.0.15"]
Any help or insight would be very welcome as I'm at a loss here.
Thanks
Alain