In Pax-Web 7.3.23 (used in Karaf 4.3.3) the following bundle was included:
javax.servlet-api/3.1.0
In Pax-Web 8.0.22 (used in Karaf 4.4.4) it has been replaced by the following pair:
jakarta.servlet-api/4.0.4
pax-web-compatibility-servlet31/8.0.22
I am using Servlet 3.1 which was provided cleanly in Pax-Web 7.3.23. But in 8.0.22 it is instead provided by the Servlet 4.0 bundle in combination with a fragment that (if I understand correctly) re-exports that code as version 3.1. Correct me if I am wrong.
This setup doesn't seem to work with iPojo.
Looking at the bundle org.ops4j.pax.web/pax-web-api/8.0.22, it seems like it only imports the following javax.servlet packages:
javax.servlet; version="[3.1, 5)",
javax.servlet.annotation; version="[3.1, 5)",
javax.servlet.http; version="[3.1, 5)"
...but not
javax.servlet.descriptor
If I add the following:
javax.servlet.descriptor;version="[3.1,5)"
To the Import-Package section of the MANIFEST.MF of the pax-we-api jar, then it works. It makes me wonder if this import is missing in pax-web-api.
I created a fragment that adds the above import to pax-web-api. It seems to work but is only a quickfix. I would appreciate it if someone more OSGi savy could explain what is actually happening.