Hi,

Thanks for your explanation. So I must use independent javax.servlet bundle.

It is a little bit strange for me, because I have this problem in one app, 
but in my other more complex app it just works without such independent 
javax.servlet bundle.
And it looks like all bundles get javax.servlet imports from 
org.ops4j.pax.web.pax-web-jetty-bundle_7.2.10.

osgi> bundle 152

org.ops4j.pax.web.pax-web-api_7.2.10 [152]
...

 Imported packages

    javax.servlet; 
version="3.1.0"<org.ops4j.pax.web.pax-web-jetty-bundle_7.2.10 [306]>

    javax.servlet.annotation; 
version="3.1.0"<org.ops4j.pax.web.pax-web-jetty-bundle_7.2.10 [306]>

    javax.servlet.http; 
version="3.1.0"<org.ops4j.pax.web.pax-web-jetty-bundle_7.2.10 [306]>


Regards,
DS

W dniu poniedziałek, 11 maja 2020 07:34:36 UTC+2 użytkownik Jean-Baptiste 
Onofré napisał:
>
> 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] 
> <javascript:>> 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] <javascript:>
>>
>> --- 
>> 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] <javascript:>.
>> 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/ab0f28f3-8fb5-4d0c-8168-48175ac3dd05%40googlegroups.com.

Reply via email to