javajettyosgijetty-10

jetty 10: Require-Capability: osgi.serviceloader; filter:="(osgi.serviceloader=org.eclipse.jetty.webapp.Configuration)"


I'm trying to migrate our embedded jetty 9.4.x to jetty 10. I'm having a couple of OSGi and dependency issues.
To isolate the problem I created a simple OSGi Launch in Eclipse, having a couple bundles:

<setEntry value="jakarta.servlet-api@default:default"/>
<setEntry value="org.apache.aries.spifly.dynamic.bundle@default:default"/>
<setEntry value="org.apache.felix.gogo.runtime@default:default"/>
<setEntry value="org.apache.felix.gogo.shell@default:default"/>
<setEntry value="org.eclipse.equinox.console@default:default"/>
<setEntry value="org.eclipse.jetty.http*10.0.5@default:default"/>
<setEntry value="org.eclipse.jetty.io*10.0.5@default:default"/>
<setEntry value="org.eclipse.jetty.security*10.0.5@default:default"/>
<setEntry value="org.eclipse.jetty.server*10.0.5@default:default"/>
<setEntry value="org.eclipse.jetty.servlet*10.0.5@default:default"/>
<setEntry value="org.eclipse.jetty.util*10.0.5@default:default"/>
<setEntry value="org.eclipse.jetty.webapp*10.0.5@default:default"/>
<setEntry value="org.eclipse.jetty.xml*10.0.5@default:default"/>
<setEntry value="org.eclipse.osgi.services@default:default"/>
<setEntry value="org.eclipse.osgi.util@default:default"/>
<setEntry value="org.eclipse.osgi@-1:true"/>
<setEntry value="org.objectweb.asm.commons@default:default"/>
<setEntry value="org.objectweb.asm.tree.analysis@default:default"/>
<setEntry value="org.objectweb.asm.tree@default:default"/>
<setEntry value="org.objectweb.asm.util@default:default"/>
<setEntry value="org.objectweb.asm@default:default"/>
<setEntry value="slf4j.api*2.0.0.alpha1@default:default"/>

If I launch this settings I get the following validation error: enter image description here

How can I solve this validation error?


Solution

  • This issue is fixed in jetty version 10.0.6:
    Bad and/or missing Require-Capability for osgi.serviceloader #6418