I am trying to get the org.apache.felix.http.jetty bundle working to provide a HTTP Service to my OSGi environment.
I also have the servlet-api bundle deployed, which exports the versioned packages, but does not provide the JavaServlet capability (as it probably should, based on the OSGi Alliance page on Reference Contracts).
Here's part of the MANIFEST of the servlet-api bundle
Export-Package: javax.servlet;uses:="javax.servlet.descriptor,javax.se
rvlet.annotation";version="3.1.0",javax.servlet.descriptor;version="3
.1.0",javax.servlet.annotation;uses:="javax.servlet";version="3.1.0",
javax.servlet.http;uses:="javax.servlet";version="3.1.0"
Implementation-Version: 3.1.0
Specification-Vendor: Oracle Corporation
Bundle-Name: Java Servlet API
Bundle-Vendor: GlassFish Community
Import-Package: javax.servlet;version="3.1.0",javax.servlet.annotation
;version="3.1.0",javax.servlet.descriptor;version="3.1.0",javax.servl
et.http;version="3.1.0"
The Provide-Capability
header is not specified at all.
So, when I start the OSGi container, it complains with this error:
Unresolved requirements: [[org.apache.felix.http.jetty [28](R 28.0)]
osgi.contract; (&(osgi.contract=JavaServlet)(version=3.1))]
Anyone knows how this can be fixed?
You should be using org.apache.felix.http.servlet-api
bundle from Felix itself.