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

Unresolved requirement: Require-Capability: osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" #2153

Closed
cheninator opened this issue Jan 23, 2018 · 5 comments

Comments

@cheninator
Copy link

I'm trying to use Jetty 9.4.8 for an Eclipse Application. I want to use HTTP/2 server features but when starting the .product, this error shows. How can I fix it without using Apache Aries SPI Fly?

` Unresolved requirement: Require-Bundle: org.eclipse.jetty.http2.server
-> Bundle-SymbolicName: org.eclipse.jetty.http2.server; bundle-version="9.4.8.v20171121"
org.eclipse.jetty.http2.server [19]
Unresolved requirement: Import-Package: org.eclipse.jetty.http2.api; version="[9.4.8,9.4.9)"
-> Export-Package: org.eclipse.jetty.http2.api; bundle-symbolic-name="org.eclipse.jetty.http2.common"; bundle-version="9.4.8.v20171121"; version="9.4.8"; uses:="org.eclipse.jetty.http2.frames,org.eclipse.jetty.util"
org.eclipse.jetty.http2.common [67]
Unresolved requirement: Import-Package: org.eclipse.jetty.http2.hpack; version="[9.4.8,9.4.9)"
-> Export-Package: org.eclipse.jetty.http2.hpack; bundle-symbolic-name="org.eclipse.jetty.http2.hpack"; bundle-version="9.4.8.v20171121"; version="9.4.8"
org.eclipse.jetty.http2.hpack [48]
Unresolved requirement: Require-Capability: osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"
Unresolved requirement: Import-Package: org.eclipse.jetty.http2; version="[9.4.8,9.4.9)"
-> Export-Package: org.eclipse.jetty.http2; bundle-symbolic-name="org.eclipse.jetty.http2.common"; bundle-version="9.4.8.v20171121"; version="9.4.8"; uses:="org.eclipse.jetty.http2.api,org.eclipse.jetty.http2.frames,org.eclipse.jetty.http2.generator,org.eclipse.jetty.http2.parser,org.eclipse.jetty.io,org.eclipse.jetty.util,org.eclipse.jetty.util.annotation,org.eclipse.jetty.util.component,org.eclipse.jetty.util.log,org.eclipse.jetty.util.thread"
Unresolved requirement: Import-Package: org.eclipse.jetty.http2.parser; version="[9.4.8,9.4.9)"
-> Export-Package: org.eclipse.jetty.http2.parser; bundle-symbolic-name="org.eclipse.jetty.http2.common"; bundle-version="9.4.8.v20171121"; version="9.4.8"; uses:="org.eclipse.jetty.http,org.eclipse.jetty.http2.frames,org.eclipse.jetty.http2.hpack,org.eclipse.jetty.io,org.eclipse.jetty.util.log"
Unresolved requirement: Import-Package: org.eclipse.jetty.http2.frames; version="[9.4.8,9.4.9)"
-> Export-Package: org.eclipse.jetty.http2.frames; bundle-symbolic-name="org.eclipse.jetty.http2.common"; bundle-version="9.4.8.v20171121"; version="9.4.8"; uses:="org.eclipse.jetty.http"
Unresolved requirement: Import-Package: org.eclipse.jetty.http2.api.server; version="[9.4.8,9.4.9)"
-> Export-Package: org.eclipse.jetty.http2.api.server; bundle-symbolic-name="org.eclipse.jetty.http2.common"; bundle-version="9.4.8.v20171121"; version="9.4.8"; uses:="org.eclipse.jetty.http2.api"
Unresolved requirement: Import-Package: org.eclipse.jetty.http2.generator; version="[9.4.8,9.4.9)"
-> Export-Package: org.eclipse.jetty.http2.generator; bundle-symbolic-name="org.eclipse.jetty.http2.common"; bundle-version="9.4.8.v20171121"; version="9.4.8"; uses:="org.eclipse.jetty.http,org.eclipse.jetty.http2.frames,org.eclipse.jetty.http2.hpack,org.eclipse.jetty.io"

!ENTRY org.eclipse.jetty.http2.hpack 2 0 2018-01-22 16:36:39.033
!MESSAGE Could not resolve module: org.eclipse.jetty.http2.hpack [48]
Unresolved requirement: Require-Capability: osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"`

@joakime
Copy link
Contributor

joakime commented Jan 23, 2018

You need a ServiceLoader implementation in OSGi for Jetty to work.

Eclipse OSGi apparently does not include one, hence the need for Apache Aries SPI Fly.
https://www.eclipse.org/forums/index.php/t/474446/

@joakime
Copy link
Contributor

joakime commented Jan 23, 2018

Apache Aries SPI Fly is the RI (Reference Implementation) for ServiceLoader support in OSGI.
See http://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html

@joakime
Copy link
Contributor

joakime commented Jan 23, 2018

According to that last article on osgi.org, wikipedia is the official source for listing the implementations of the various OSGi specs.

For the ServiceLoader Mediator ...
https://en.wikipedia.org/wiki/OSGi_Specification_Implementations#133:_Service_Loader_Mediator_Specification

Apache Aries SPI Fly is the only implementation.

@joakime
Copy link
Contributor

joakime commented Jan 23, 2018

Also note, that for HTTP/2, you'll need ALPN support.

If your runtime is Java 8, then you'll need an alpn-boot.jar loaded via the JVM -Xbootclasspath/p: features for the specific JVM version you are running.

For OSGi, you'll also need the jetty-osgi-alpn jar.

See: https://www.eclipse.org/jetty/documentation/9.4.x/alpn-chapter.html

If your runtime is Java 9, you can use the Java 9 support library jetty-alpn-java-server (instead of the -Xbootclasspath/p: stuff and the alpn-boot.jar)

@Hepale
Copy link

Hepale commented Jul 12, 2018

"I edited the Plug-ins tab on the Run Configuration and checked org.eclipse.equinox.ds and clicked "Add Required Plug-ins". That fixed it."
https://bugs.eclipse.org/bugs/show_bug.cgi?id=494913#c2

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

No branches or pull requests

3 participants