exactly the WebContextPath needs to differ, otherwise the bundle will
install but the web context isn't started for it.
In case the other bundle is stopped, Pax Web will start this context
instantly.
Take also a look at the web:list, web:stop, web:start commands, those are
for this scenario.

regards, Achim


2015-05-11 20:29 GMT+02:00 Charlie Mordant <cmorda...@gmail.com>:

> Hi Scott,
>
> I don't think WABs could be a problem if the WebContextPath (or
> WebAppContext) header differ.
>
> 2015-05-11 20:27 GMT+02:00 Leschke, Scott <slesc...@medline.com>:
>
>>  If the bundles are WABs (Web App Bundles), I don’t believe you can have
>> different versions of a bundle running at the same time as in that case
>> you’ll more than likely have multiple servlets mapped to the same URL.
>>
>>
>>
>> *From:* Stephen Kahmann [mailto:stephen.kahm...@inovexcorp.com]
>> *Sent:* Monday, May 11, 2015 1:20 PM
>> *To:* user@karaf.apache.org
>>
>> *Subject:* Re: Install two versions of same bundle
>>
>>
>>
>> My thoughts exactly! :-)
>>
>>
>>
>> From my previous example, you can see that 2.7 is active, and when I
>> “install” 2.8, Karaf doesn’t actually install it. Karaf seems to see that
>> 2.7 is active and just skips installing 2.8.
>>
>>
>>
>> Then later, I installed and activated 2.8 then tried to install 2.7 via
>> OBR and the OBR feature *replaced* my active 2.8 bundle as shown below:
>>
>>
>>
>> *karaf*@root()> list | grep Open
>>
>> 283 | Active    |  80 | 2.8.1                                     | OpenRDF
>> Sesame: Runtime - OSGi
>>
>> *karaf*@root()> obr:deploy org.openrdf.sesame2
>>
>> Target resource(s):
>>
>> -------------------
>>
>>    OpenRDF Sesame: Runtime - OSGi (2.7.14)
>>
>>
>>
>> Deploying...done.
>>
>> *karaf*@root()> list | grep Open
>>
>> 283 | Active    |  80 | 2.7.14                                    | OpenRDF
>> Sesame: Runtime - OSGi
>>
>>
>>
>> Needless to say this is very frustrating. To me they both look like bugs,
>> but I wasn’t sure if this was known behavior.
>>
>>
>>
>> Thank you!
>>
>>
>>
>> *From: *Charlie Mordant <cmorda...@gmail.com>
>> *Reply-To: *"user@karaf.apache.org" <user@karaf.apache.org>
>> *Date: *Monday, May 11, 2015 at 2:12 PM
>> *To: *"user@karaf.apache.org" <user@karaf.apache.org>
>> *Subject: *Re: Install two versions of same bundle
>>
>>
>>
>> Hi,
>>
>>
>>
>> Should work, OSGI is done for this! Is OpenRDF 2.8.x started?
>>
>>
>>
>> Regards,
>>
>>
>>
>> 2015-05-11 18:46 GMT+02:00 Stephen Kahmann <
>> stephen.kahm...@inovexcorp.com>:
>>
>>  Hi,
>>
>>
>>
>> I need to install two versions of a bundle. One version is 2.7.14 and the
>> other is 2.8.1. These bundles do no follow semantic versioning so 2.8 is
>> not backwards compatible. Some of my bundles require 2.7 and some require
>> 2.8. The headers are set correctly for both. The problem is that I cannot
>> install 2.8 when 2.7 is already installed. Is this a bug or expected
>> behavior?
>>
>>
>>
>> *karaf*@root()> list | grep OpenRDF
>>
>> 195 | Active    |  80 | 2.7.14                                    |
>> OpenRDF Sesame: Runtime - OSGi
>>
>> *karaf*@root()> install
>> file:/Users/user/lib/apache-karaf-3.0.3/deploy/sesame-runtime-osgi-2.8.1.jar
>>
>> Bundle ID: 195
>>
>> *karaf*@root()> list | grep OpenRDF
>>
>> 195 | Active    |  80 | 2.7.14                                    |
>> OpenRDF Sesame: Runtime – OSGi
>>
>> *karaf*@root()> start 198
>>
>> Error executing command: Error executing command on bundles:
>>
>> Unable to execute command on bundle 198: Unresolved constraint in bundle
>> com.example.bundle [198]: Unable to resolve 198.0: missing requirement
>> [198.0] osgi.wiring.package;
>> (&(osgi.wiring.package=com.com.example.bundle.api)(version>=1.0.0)(!(version>=2.0.0)))
>> [caused by: Unable to resolve 194.0: missing requirement [194.0]
>> osgi.wiring.package;
>> (&(osgi.wiring.package=org.openrdf.repository)(version>=2.8.0)(!(version>=3.0.0)))]
>>
>>
>>
>> Thanks
>>
>>
>>
>>
>>
>> --
>>
>> Charlie Mordant
>>
>> Full OSGI/EE stack made with Karaf:
>> https://github.com/OsgiliathEnterprise/net.osgiliath.parent
>>
>
>
>
> --
> Charlie Mordant
>
> Full OSGI/EE stack made with Karaf:
> https://github.com/OsgiliathEnterprise/net.osgiliath.parent
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Reply via email to