Hi JB

I have still the vetoed 4.0.5 on my drive and I can reproduce this problem. I 
have also tested it with 
https://repository.apache.org/content/repositories/snapshots/org/apache/karaf/apache-karaf/4.0.5-SNAPSHOT/apache-karaf-4.0.5-20160410.092716-92.tar.gz
 and the roblem still occurs. 

Regards
Krzysztof



On 11.04.2016 06:34, Jean-Baptiste Onofré wrote:
> Hi Krzysztof
>
> Did you try with 4.0.5-SNAPSHOT ?
> I think commit 41fc57fdcd0697d5dad3a49a56779c310b6c629b may help.
>
> Regards
> JB
>
> On 04/10/2016 11:39 PM, Krzysztof Sobkowiak wrote:
>> Hi
>>
>> Some time ago Cristiano has reported a problem in ServiceMix 7. When you try 
>> to install Spring 4.2.3.RELEASE_1, the bundles from Spring 3.1.4 are 
>> installed as well (details here 
>> http://servicemix.396122.n5.nabble.com/Why-the-feature-spring-4-2-3-RELEASE-1-also-installs-bundles-from-Spring-version-3-1-4-td5723497.html).
>>
>> This problem doesn't occur on fresh Karaf 4.0.4, but I have researched this 
>> problem a bit and have some findings, but I don't understand why the 
>> resolver installs the bundles from 3.1.4.
>>
>> I could reproduce this problem on karaf 4.0.4
>>
>> karaf@root()> feature:repo-add activemq 5.13.2
>> Adding feature url mvn:org.apache.activemq/activemq-karaf/5.13.2/xml/features
>> karaf@root()> feature:install  activemq-client
>>
>> After installing activemq-client Spring 3.2.14.RELEASE is installed and 
>> correctly wired
>>
>> karaf@root()> list -t 0  | grep spring
>> 64 | Active   |  30 | 3.2.14.RELEASE_1 | Apache ServiceMix :: Bundles :: 
>> spring-aop
>> 65 | Active   |  30 | 3.2.14.RELEASE_1 | Apache ServiceMix :: Bundles :: 
>> spring-beans
>> 66 | Active   |  30 | 3.2.14.RELEASE_1 | Apache ServiceMix :: Bundles :: 
>> spring-context
>> 67 | Active   |  30 | 3.2.14.RELEASE_1 | Apache ServiceMix :: Bundles :: 
>> spring-context-support
>> 68 | Active   |  30 | 3.2.14.RELEASE_1 | Apache ServiceMix :: Bundles :: 
>> spring-core
>> 69 | Active   |  30 | 3.2.14.RELEASE_1 | Apache ServiceMix :: Bundles :: 
>> spring-expression
>>
>> karaf@root()> bundle:requirements 70
>> org.apache.xbean.spring [70] requires:
>> --------------------------------------
>> osgi.wiring.package; 
>> (&(osgi.wiring.package=org.springframework.beans)(version>=2.5.0)(!(version>=4.0.0)))
>>  resolved by:
>>     osgi.wiring.package; org.springframework.beans 3.2.14.RELEASE from 
>> org.apache.servicemix.bundles.spring-beans [65]
>> osgi.wiring.package; 
>> (&(osgi.wiring.package=org.springframework.beans.factory)(version>=2.5.0)(!(version>=4.0.0)))
>>  resolved by:
>>     osgi.wiring.package; org.springframework.beans.factory 3.2.14.RELEASE 
>> from org.apache.servicemix.bundles.spring-beans [65]
>> .....
>>
>> karaf@root()> bundle:requirements 52
>> org.apache.activemq.activemq-osgi [52] requires:
>> ------------------------------------------------
>> ...
>> osgi.wiring.package; 
>> (&(osgi.wiring.package=org.springframework.beans)(version>=3.0.0)(!(version>=5.0.0)))
>>  resolved by:
>>     osgi.wiring.package; org.springframework.beans 3.2.14.RELEASE from 
>> org.apache.servicemix.bundles.spring-beans [65]
>> osgi.wiring.package; 
>> (&(osgi.wiring.package=org.springframework.beans.factory)(version>=3.0.0)(!(version>=5.0.0)))
>>  resolved by:
>>     osgi.wiring.package; org.springframework.beans.factory 3.2.14.RELEASE 
>> from org.apache.servicemix.bundles.spring-beans [65]
>> osgi.wiring.package; 
>> (&(osgi.wiring.package=org.springframework.beans.factory.config)(version>=3.0.0)(!(version>=5.0.0)))
>>  resolved by:
>> ....
>>
>> Let's install now Spring 4.2.3.RELEASE_1
>>
>> karaf@root()> feature:install -v spring/4.2.3.RELEASE_1
>> Adding features: spring/[4.2.3.RELEASE_1,4.2.3.RELEASE_1]
>> Changes to perform:
>>    Region: root
>>      Bundles to install:
>>        
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/4.2.3.RELEASE_1
>>        
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/4.2.3.RELEASE_1
>>        
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/4.2.3.RELEASE_1
>>        
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/4.2.3.RELEASE_1
>>        
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/4.2.3.RELEASE_1
>>        
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/4.2.3.RELEASE_1
>> *      mvn:org.springframework/spring-aop/3.1.4.RELEASE**
>> **      mvn:org.springframework/spring-asm/3.1.4.RELEASE**
>> **      mvn:org.springframework/spring-beans/3.1.4.RELEASE**
>> **      mvn:org.springframework/spring-context/3.1.4.RELEASE**
>> **      mvn:org.springframework/spring-context-support/3.1.4.RELEASE**
>> **      mvn:org.springframework/spring-core/3.1.4.RELEASE**
>> **      mvn:org.springframework/spring-expression/3.1.4.RELEASE*
>> Installing bundles:
>>    
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/4.2.3.RELEASE_1
>>    
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/4.2.3.RELEASE_1
>>    
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/4.2.3.RELEASE_1
>>    
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/4.2.3.RELEASE_1
>>    
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/4.2.3.RELEASE_1
>>    
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/4.2.3.RELEASE_1
>> *  mvn:org.springframework/spring-aop/3.1.4.RELEASE**
>> **  mvn:org.springframework/spring-asm/3.1.4.RELEASE**
>> **  mvn:org.springframework/spring-beans/3.1.4.RELEASE**
>> **  mvn:org.springframework/spring-context/3.1.4.RELEASE**
>> **  mvn:org.springframework/spring-context-support/3.1.4.RELEASE**
>> **  mvn:org.springframework/spring-core/3.1.4.RELEASE**
>> **  mvn:org.springframework/spring-expression/3.1.4.RELEASE*
>> Stopping bundles:
>>    org.apache.xbean.spring/3.18.0
>>    org.apache.activemq.activemq-osgi/5.13.2
>> Refreshing bundles:
>>      org.apache.activemq.activemq-osgi/5.13.2 (Should be wired to: 
>> org.apache.servicemix.bundles.spring-core/4.2.3.RELEASE_1 (through 
>> [org.apache.activemq.activemq-osgi/5.13.2] osgi.wiring.package; 
>> filter:="(&(osgi.wiring.package=org.springframework.core.io)(version>=3.0.0)(!(version>=5.0.0)))";
>>  resolution:=optional), 
>> org.apache.servicemix.bundles.spring-beans/4.2.3.RELEASE_1 (through 
>> [org.apache.activemq.activemq-osgi/5.13.2] osgi.wiring.package; 
>> filter:="(&(osgi.wiring.package=org.springframework.beans)(version>=3.0.0)(!(version>=5.0.0)))";
>>  resolution:=optional), 
>> org.apache.servicemix.bundles.spring-context/4.2.3.RELEASE_1 (through 
>> [org.apache.activemq.activemq-osgi/5.13.2] osgi.wiring.package; 
>> filter:="(&(osgi.wiring.package=org.springframework.context)(version>=3.0.0)(!(version>=5.0.0)))";
>>  resolution:=optional))
>> *    org.apache.xbean.spring/3.18.0 (Should be wired to: 
>> org.springframework.beans/3.1.4.RELEASE (through 
>> [org.apache.xbean.spring/3.18.0] osgi.wiring.package; 
>> filter:="(&(osgi.wiring.package=org.springframework.beans)(version>=2.5.0)(!(version>=4.0.0)))"),
>>  org.springframework.core/3.1.4.RELEASE (through 
>> [org.apache.xbean.spring/3.18.0] osgi.wiring.package; 
>> filter:="(&(osgi.wiring.package=org.springframework.core.io)(version>=2.5.0)(!(version>=4.0.0)))"),
>>  org.springframework.context/3.1.4.RELEASE (through 
>> [org.apache.xbean.spring/3.18.0] osgi.wiring.package; 
>> filter:="(&(osgi.wiring.package=org.springframework.context)(version>=2.5.0)(!(version>=4.0.0)))"))*
>> Starting bundles:
>>    org.apache.servicemix.bundles.spring-core/4.2.3.RELEASE_1
>>    org.springframework.asm/3.1.4.RELEASE
>>    org.springframework.core/3.1.4.RELEASE
>>    org.apache.servicemix.bundles.spring-beans/4.2.3.RELEASE_1
>>    org.apache.servicemix.bundles.spring-aop/4.2.3.RELEASE_1
>>    org.apache.servicemix.bundles.spring-expression/4.2.3.RELEASE_1
>>    org.apache.servicemix.bundles.spring-context/4.2.3.RELEASE_1
>>    org.apache.servicemix.bundles.spring-context-support/4.2.3.RELEASE_1
>>    org.springframework.beans/3.1.4.RELEASE
>>    org.springframework.aop/3.1.4.RELEASE
>>    org.springframework.expression/3.1.4.RELEASE
>>    org.springframework.context/3.1.4.RELEASE
>>    org.springframework.context.support/3.1.4.RELEASE
>>    org.apache.xbean.spring/3.18.0
>>    org.apache.activemq.activemq-osgi/5.13.2
>> Done.
>>
>> activemq-osgi wires now Spring 4.2.3.RELEASE  but xbean wires Spring 
>> 3.1.4.RELEASE
>>
>> karaf@root()> bundle:requirements 70
>> org.apache.xbean.spring [70] requires:
>> --------------------------------------
>> osgi.wiring.package; 
>> (&(osgi.wiring.package=org.springframework.beans)(version>=2.5.0)(!(version>=4.0.0)))
>>  resolved by:
>>     osgi.wiring.package; org.springframework.beans 3.1.4.RELEASE from 
>> org.springframework.beans [84]
>> osgi.wiring.package; 
>> (&(osgi.wiring.package=org.springframework.beans.factory)(version>=2.5.0)(!(version>=4.0.0)))
>>  resolved by:
>>     osgi.wiring.package; org.springframework.beans.factory 3.1.4.RELEASE 
>> from org.springframework.beans [84]
>> ....
>>
>> karaf@root()> bundle:requirements 52
>> org.apache.activemq.activemq-osgi [52] requires:
>> ------------------------------------------------
>> ...
>> osgi.wiring.package; 
>> (&(osgi.wiring.package=org.springframework.beans)(version>=3.0.0)(!(version>=5.0.0)))
>>  resolved by:
>>     osgi.wiring.package; org.springframework.beans 4.2.3.RELEASE from 
>> org.apache.servicemix.bundles.spring-beans [77]
>> osgi.wiring.package; 
>> (&(osgi.wiring.package=org.springframework.beans.factory)(version>=3.0.0)(!(version>=5.0.0)))
>>  resolved by:
>>     osgi.wiring.package; org.springframework.beans.factory 4.2.3.RELEASE 
>> from org.apache.servicemix.bundles.spring-beans [77]
>> osgi.wiring.package; 
>> (&(osgi.wiring.package=org.springframework.beans.factory.config)(version>=3.0.0)(!(version>=5.0.0)))
>>  resolved by:
>>     osgi.wiring.package; org.springframework.beans.factory.config 
>> 4.2.3.RELEASE from org.apache.servicemix.bundles.spring-beans [77]
>> ....
>>
>> The same effect with ActiveMQ 5.14-SNAPSHOT. For comparison, the problem 
>> doesn't happen with ActiveMQ 5.12.x
>>
>> karaf@root()> feature:repo-add activemq 5.12.3
>> Adding feature url mvn:org.apache.activemq/activemq-karaf/5.12.3/xml/features
>> karaf@root()> feature:install  activemq-client
>> karaf@root()> feature:install -v spring/4.2.3.RELEASE_1
>> Adding features: spring/[4.2.3.RELEASE_1,4.2.3.RELEASE_1]
>> Changes to perform:
>>    Region: root
>>      Bundles to install:
>>        
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/4.2.3.RELEASE_1
>>        
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/4.2.3.RELEASE_1
>>        
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/4.2.3.RELEASE_1
>>        
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/4.2.3.RELEASE_1
>>        
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/4.2.3.RELEASE_1
>>        
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/4.2.3.RELEASE_1
>> Installing bundles:
>>    
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/4.2.3.RELEASE_1
>>    
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/4.2.3.RELEASE_1
>>    
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/4.2.3.RELEASE_1
>>    
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/4.2.3.RELEASE_1
>>    
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/4.2.3.RELEASE_1
>>    
>> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/4.2.3.RELEASE_1
>> Starting bundles:
>>    org.apache.servicemix.bundles.spring-core/4.2.3.RELEASE_1
>>    org.apache.servicemix.bundles.spring-expression/4.2.3.RELEASE_1
>>    org.apache.servicemix.bundles.spring-beans/4.2.3.RELEASE_1
>>    org.apache.servicemix.bundles.spring-aop/4.2.3.RELEASE_1
>>    org.apache.servicemix.bundles.spring-context/4.2.3.RELEASE_1
>>    org.apache.servicemix.bundles.spring-context-support/4.2.3.RELEASE_1
>> Done.
>>
>>
>> So I think the problem is connected with changes in ActiveMQ 5.13.x. Indeed, 
>> activemq-osgi 5.13.x imports Spring with range [3,5) whereas the in 5.12.x 
>> the range is  [3,4]. Xbeans inports in both cases Spring in range [2.5, 4). 
>> So, Spring 3.2.14.RELEASE_1  (which already has been installed at the 
>> beginning) would be ideal candidate to be wired into the both bundles.
>>
>>   1. I can understand, that ativemq-osgi re-wires the newer Spring version 
>> (after installation of 4.2.4.RELEASE_1) because it's ok for the version 
>> range.  4.2.4.RELEASE_1 is good for activemq-osgi but not ok for xbeans. My 
>> question - why should activemq-osgi use 4.2.4.RELEASE_1 and not 
>> 3.2.14.RELEASE when 3.2.14.RELEASE is ideal for both bundles (activemq-osgi 
>> and xbeans) and 4.2.4.RELEASE_1 only for activeq-osgi?
>>   2. Assuming it's ok what happens with point 1, why the resolver resolves, 
>> installs and wires 3.1.4.RELEASE into xbeans when  3.2.14.RELEASE was 
>> already installed and is ok (even better than 3.1.4.RELEASE) for version 
>> range defined in xbeans?
>>
>> I could miss something, bu I think, something works here odd. Could you 
>> check it please?
>>
>> Kindly regards
>> Krzysztof
>>
>>
>

-- 
Krzysztof Sobkowiak (@ksobkowiak)

JEE & OSS Architect, Integration Architect
Apache Software Foundation Member (http://apache.org/)
Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)

Reply via email to