That makes sense. After doing some more testing, it appears to be an OBR issue. 
I’ll double-check that the indexes have all the correct version restrictions 
and see if that helps.

Thank you!



From: Achim Nierbeck <bcanh...@googlemail.com<mailto:bcanh...@googlemail.com>>
Reply-To: "user@karaf.apache.org<mailto:user@karaf.apache.org>" 
<user@karaf.apache.org<mailto:user@karaf.apache.org>>
Date: Monday, May 11, 2015 at 2:31 PM
To: "user@karaf.apache.org<mailto:user@karaf.apache.org>" 
<user@karaf.apache.org<mailto:user@karaf.apache.org>>
Subject: Re: Install two versions of same bundle

Ahh, there you go.
You install it via an OBR, that's most likely the reason.
If you use an OBR, and try to install the slightly higher version, it'll try to 
check if it's actually required. No Bundle seems to require this exact version. 
 Therefore no need to install it. Same thing for installing a lower version.
So you either need to install it without OBR, or make sure that another bundle 
is actually using the newer version while the other bundle does require the 
exact version of the old one.


Regards, Achim

2015-05-11 20:20 GMT+02:00 Stephen Kahmann 
<stephen.kahm...@inovexcorp.com<mailto:stephen.kahm...@inovexcorp.com>>:
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<mailto:cmorda...@gmail.com>>
Reply-To: "user@karaf.apache.org<mailto:user@karaf.apache.org>" 
<user@karaf.apache.org<mailto:user@karaf.apache.org>>
Date: Monday, May 11, 2015 at 2:12 PM
To: "user@karaf.apache.org<mailto:user@karaf.apache.org>" 
<user@karaf.apache.org<mailto: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<mailto: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



--

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