Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quickstart example fails with Java>1.8 #206

Open
dmm9 opened this issue Sep 18, 2023 · 1 comment · May be fixed by #207
Open

Quickstart example fails with Java>1.8 #206

dmm9 opened this issue Sep 18, 2023 · 1 comment · May be fixed by #207

Comments

@dmm9
Copy link

dmm9 commented Sep 18, 2023

Related to #191, but I cannot reopen that issue.

Building the quickstart example succeeds. But when running the jar, several OSGI errors appear due to several unresolved Import-Packages. At the end, it traces down to the fact that all the javax.* packages were removed from the JDK between version 1.8 and version 11. So, any modern JDK will fail to run.

I am working on a PR.

! Failed to start bundle org.osgi.enroute.examples.quickstart.rest-0.0.2.202309181042, exception Could not resolve module: org.osgi.enroute.examples.quickstart.rest [14]
  Unresolved requirement: Require-Capability: osgi.contract; osgi.contract="JavaJAXRS"; filter:="(&(osgi.contract=JavaJAXRS)(version=2.1.0))"
    -> Provide-Capability: osgi.contract; version:List<Version>="2.1.0,2.0.0,1.1.0"; osgi.contract="JavaJAXRS"; uses:="javax.ws.rs,javax.ws.rs.client,javax.ws.rs.container,javax.ws.rs.core,javax.ws.rs.ext,javax.ws.rs.sse"
       org.apache.aries.javax.jax.rs-api [3]
         Unresolved requirement: Import-Package: org.apache.geronimo.osgi.registry.api; resolution:="optional"
         Unresolved requirement: Import-Package: javax.xml.bind.annotation
  Unresolved requirement: Import-Package: javax.ws.rs
    -> Export-Package: javax.ws.rs; bundle-symbolic-name="org.apache.aries.javax.jax.rs-api"; bundle-version="1.0.4"; version="2.1.0"; uses:="javax.ws.rs.core"
  Unresolved requirement: Require-Capability: osgi.implementation; filter:="(&(osgi.implementation=osgi.jaxrs)(version>=1.0.0)(!(version>=2.0.0)))"
    -> Provide-Capability: osgi.implementation; version:Version="1.0.0"; osgi.implementation="osgi.jaxrs"; uses:="javax.ws.rs,javax.ws.rs.core,javax.ws.rs.ext,javax.ws.rs.client,javax.ws.rs.container,javax.ws.rs.sse,org.osgi.service.jaxrs.whiteboard"
       org.apache.aries.jax.rs.whiteboard [10]
         Unresolved requirement: Import-Package: javax.activation

org.osgi.framework.BundleException: Could not resolve module: org.osgi.enroute.examples.quickstart.rest [14]
  Unresolved requirement: Require-Capability: osgi.contract; osgi.contract="JavaJAXRS"; filter:="(&(osgi.contract=JavaJAXRS)(version=2.1.0))"
    -> Provide-Capability: osgi.contract; version:List<Version>="2.1.0,2.0.0,1.1.0"; osgi.contract="JavaJAXRS"; uses:="javax.ws.rs,javax.ws.rs.client,javax.ws.rs.container,javax.ws.rs.core,javax.ws.rs.ext,javax.ws.rs.sse"
       org.apache.aries.javax.jax.rs-api [3]
         Unresolved requirement: Import-Package: org.apache.geronimo.osgi.registry.api; resolution:="optional"
         Unresolved requirement: Import-Package: javax.xml.bind.annotation
  Unresolved requirement: Import-Package: javax.ws.rs
    -> Export-Package: javax.ws.rs; bundle-symbolic-name="org.apache.aries.javax.jax.rs-api"; bundle-version="1.0.4"; version="2.1.0"; uses:="javax.ws.rs.core"
  Unresolved requirement: Require-Capability: osgi.implementation; filter:="(&(osgi.implementation=osgi.jaxrs)(version>=1.0.0)(!(version>=2.0.0)))"
    -> Provide-Capability: osgi.implementation; version:Version="1.0.0"; osgi.implementation="osgi.jaxrs"; uses:="javax.ws.rs,javax.ws.rs.core,javax.ws.rs.ext,javax.ws.rs.client,javax.ws.rs.container,javax.ws.rs.sse,org.osgi.service.jaxrs.whiteboard"
       org.apache.aries.jax.rs.whiteboard [10]
         Unresolved requirement: Import-Package: javax.activation

        at org.eclipse.osgi.container.Module.start(Module.java:463)
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:439)
        at aQute.launcher.Launcher.start(Launcher.java:686)
        at aQute.launcher.Launcher.startBundles(Launcher.java:666)
        at aQute.launcher.Launcher.activate(Launcher.java:572)
        at aQute.launcher.Launcher.launch(Launcher.java:402)
        at aQute.launcher.Launcher.run(Launcher.java:184)
        at aQute.launcher.Launcher.main(Launcher.java:160)
        at aQute.launcher.pre.EmbeddedLauncher.executeWithRunPath(EmbeddedLauncher.java:170)
        at aQute.launcher.pre.EmbeddedLauncher.findAndExecute(EmbeddedLauncher.java:119)
        at aQute.launcher.pre.EmbeddedLauncher.main(EmbeddedLauncher.java:52)
@dmm9 dmm9 linked a pull request Sep 18, 2023 that will close this issue
@juergen-albert
Copy link

@dmm9 thanks heaps for the issues in PRs you opened. Since OSGi moved to Eclipse, we haven't put much love in enroute. So thanks for bringing it back to our attention. We will look at what you have provided as soon as we are able. Please hang tight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants