Return-Path: X-Original-To: apmail-karaf-dev-archive@minotaur.apache.org Delivered-To: apmail-karaf-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8335A18CF0 for ; Mon, 11 Apr 2016 04:34:21 +0000 (UTC) Received: (qmail 78551 invoked by uid 500); 11 Apr 2016 04:34:21 -0000 Delivered-To: apmail-karaf-dev-archive@karaf.apache.org Received: (qmail 78511 invoked by uid 500); 11 Apr 2016 04:34:21 -0000 Mailing-List: contact dev-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list dev@karaf.apache.org Received: (qmail 78499 invoked by uid 99); 11 Apr 2016 04:34:21 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Apr 2016 04:34:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 95075C0BC3 for ; Mon, 11 Apr 2016 04:34:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.413 X-Spam-Level: ** X-Spam-Status: No, score=2.413 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_LOW=-0.7, URI_HEX=1.313] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 7jN8S7DbP9RH for ; Mon, 11 Apr 2016 04:34:18 +0000 (UTC) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 769685FAEA for ; Mon, 11 Apr 2016 04:34:17 +0000 (UTC) Received: from mfilter31-d.gandi.net (mfilter31-d.gandi.net [217.70.178.162]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id EF49241C07D for ; Mon, 11 Apr 2016 06:34:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter31-d.gandi.net Received: from relay5-d.mail.gandi.net ([IPv6:::ffff:217.70.183.197]) by mfilter31-d.gandi.net (mfilter31-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id nQbfDp0NTCVa for ; Mon, 11 Apr 2016 06:34:08 +0200 (CEST) X-Originating-IP: 82.238.224.4 Received: from [192.168.134.16] (bre91-1-82-238-224-4.fbx.proxad.net [82.238.224.4]) (Authenticated sender: jb@nanthrax.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 8EC8141C07F for ; Mon, 11 Apr 2016 06:34:08 +0200 (CEST) Subject: Re: Feature spring/4.2.3.RELEASE_1 also installs bundles from Spring version 3.1.4 when activemq is installed To: dev@karaf.apache.org References: <570AC825.6000009@gmail.com> From: =?UTF-8?Q?Jean-Baptiste_Onofr=c3=a9?= Message-ID: <570B293F.8010506@nanthrax.net> Date: Mon, 11 Apr 2016 06:34:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <570AC825.6000009@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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 > > -- Jean-Baptiste Onofré jbonofre@apache.org http://blog.nanthrax.net Talend - http://www.talend.com