Hi, If you take a look on the Jetty Karaf feature, you can see the javax.servlet is installed as bundle:
https://github.com/ops4j/org.ops4j.pax.web/blob/pax-web-7.2.x/pax-web-features/src/main/resources/features.xml#L38 So you have to do the same. As Pax Web is "container" agnostic (meaning it can run tomcat, jetty, undertow), the API can't use package provided by impl bundle. That's why you have to install javax.servlet bundle for pax-web-api. Furthermore, pax-web-jetty bundle also imports javax.servlet: https://github.com/ops4j/org.ops4j.pax.web/blob/pax-web-7.2.x/pax-web-jetty/pom.xml#L68 So, if you just install javax.servlet bundle, it will just run fine. PS: Karaf simplify a lot the installation thanks to the features. Regards JB On Fri, May 8, 2020 at 12:00 PM Daniel Stoch <[email protected]> wrote: > Hi, > > I have a strange error when trying to run a couple of bundles (using > Equinox) including 4 from Pax-Web 7.2.10. In some other, more complex > scenario, these Pax-Web also starts properly but I cannot find why. > - pax-web-api > - pax-web-spi > - pax-web-jetty-bundle > - pax-web-extender-whiteboard > > These bundles could not be resolved: > - javax.servlet is exported by pax-web-jetty-bundle and it is needed by > pax-web-api > - but pax-web-api exports org.ops4j.pax.web.service which is required by > pax-web-jetty-bundle > > org.osgi.framework.BundleException: The bundle > "org.ops4j.pax.web.pax-web-api_7.2.10 [12]" could not be resolved. Reason: > Missing Constraint: Import-Package: javax.servlet; version="[2.3.0,4.0.0)" > org.osgi.framework.BundleException: The bundle > "org.ops4j.pax.web.pax-web-jetty-bundle_7.2.10 [5]" could not be resolved. > Reason: Package uses conflict: Import-Package: org.ops4j.pax.web.service; > version="7.2.10" > org.osgi.framework.BundleException: The bundle > "org.ops4j.pax.web.pax-web-extender-whiteboard_7.2.10 [9]" could not be > resolved. Reason: Missing Constraint: Import-Package: > org.ops4j.pax.web.service; version="7.2.10" > org.osgi.framework.BundleException: The bundle > "org.ops4j.pax.web.pax-web-spi_7.2.10 [20]" could not be resolved. Reason: > Missing Constraint: Import-Package: org.ops4j.pax.web.service; > version="7.2.10" > > > How to solve this problem (what can be wrong, how to diagnose it) or what > am i doing wrong? > > -- > Best regards, > Daniel Stoch > > -- > -- > ------------------ > OPS4J - http://www.ops4j.org - [email protected] > > --- > You received this message because you are subscribed to the Google Groups > "OPS4J" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ops4j/05b0f11c-54c2-46b2-a30a-11bf5b8a40ea%40googlegroups.com > <https://groups.google.com/d/msgid/ops4j/05b0f11c-54c2-46b2-a30a-11bf5b8a40ea%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -- ------------------ OPS4J - http://www.ops4j.org - [email protected] --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/CAB8EV3SitHTEPFoKL%3D8WLgkG1heADmLqf5zDfjBAwpz%2B_LzHrw%40mail.gmail.com.
