3
votes

After updating from Jetty 9.3.x to 9.4.x I'm getting the following validate message when I launch my OSGi Framework launch:

Missing Constraint: Require-Capability: osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)"
Missing Constraint: Require-Capability: osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"

enter image description here

I can't figure out the bundles I have to add?

Already included in the launch (among many others):

  • org.eclipse.jetty.client
  • org.eclipse.jetty.continuation
  • org.eclipse.jetty.deploy
  • org.eclipse.jetty.http
  • org.eclipse.jetty.io
  • org.eclipse.jetty.rewrite
  • org.eclipse.jetty.security
  • org.eclipse.jetty.server
  • org.eclipse.jetty.servlet
  • org.eclipse.jetty.servlets
  • org.eclipse.jetty.util
  • org.eclipse.jetty.webapp
  • org.eclipse.jetty.xml
  • org.eclipse.osgi
  • org.eclipse.osgi.services
  • org.eclipse.osgi.util

The server launches without error messages after clicking "OK" in the dialog.
I hoped this issue would be fixed in Jetty 9.4.5 but it remains.

2
This is due to the increased reliance on java.util.ServiceLoader within many of the specs that Jetty relies on (outside of OSGi). - Joakim Erdfelt
java.util.ServiceLoader is part of the JRE 1.8, why do I get a validation error? - flavio.donze
Thanks for the link got it fixed. - flavio.donze

2 Answers

3
votes

I had to download and add the following three bundles to the target:

As described on the Apache Aries SPI Fly website, section Getting SPI Fly.

Since I do not want to manipulate the bytecode I choose "For use with dynamic weaving".

More information on the topic can be found in this blog.

2
votes

It appears you need an implementation of the OSGi Service Loader Mediator specification. Try Apache Aries SPI Fly.