I just tried it again on a totally vanilla karaf instance, newly
decompressed from the tar.gz:

feature:install spring-dm-web

results in both Spring 3.1.4 and Spring 3.2.14 being loaded:

karaf@root()> list -t 0 -l | grep spring
 58 | Active   |  30 | 4.0.4            |
mvn:org.apache.karaf.bundle/org.apache.karaf.bundle.springstate/4.0.4
 59 | Active   |  30 | 4.0.4            |
mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/4.0.4
 63 | Active   |  30 | 3.2.14.RELEASE_1 |
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/3.2.14.RELEASE_1
 64 | Active   |  30 | 3.2.14.RELEASE_1 |
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/3.2.14.RELEASE_1
 65 | Active   |  30 | 3.2.14.RELEASE_1 |
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/3.2.14.RELEASE_1
 66 | Active   |  30 | 3.2.14.RELEASE_1 |
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/3.2.14.RELEASE_1
 67 | Active   |  30 | 3.2.14.RELEASE_1 |
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/3.2.14.RELEASE_1
 68 | Active   |  30 | 3.2.14.RELEASE_1 |
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/3.2.14.RELEASE_1
 69 | Active   |  30 | 3.2.14.RELEASE_1 |
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/3.2.14.RELEASE_1
 70 | Active   |  30 | 3.2.14.RELEASE_1 |
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/3.2.14.RELEASE_1
102 | Active   |  30 | 3.1.4.RELEASE    |
mvn:org.springframework/spring-aop/3.1.4.RELEASE
103 | Active   |  30 | 3.1.4.RELEASE    |
mvn:org.springframework/spring-asm/3.1.4.RELEASE
104 | Active   |  30 | 3.1.4.RELEASE    |
mvn:org.springframework/spring-beans/3.1.4.RELEASE
105 | Active   |  30 | 3.1.4.RELEASE    |
mvn:org.springframework/spring-context/3.1.4.RELEASE
106 | Active   |  30 | 3.1.4.RELEASE    |
mvn:org.springframework/spring-context-support/3.1.4.RELEASE
107 | Active   |  30 | 3.1.4.RELEASE    |
mvn:org.springframework/spring-core/3.1.4.RELEASE
108 | Active   |  30 | 3.1.4.RELEASE    |
mvn:org.springframework/spring-expression/3.1.4.RELEASE
109 | Active   |  30 | 1.2.1            |
mvn:org.springframework.osgi/spring-osgi-core/1.2.1
110 | Active   |  30 | 1.2.1            |
mvn:org.springframework.osgi/spring-osgi-extender/1.2.1
111 | Active   |  30 | 1.2.1            |
mvn:org.springframework.osgi/spring-osgi-annotation/1.2.1
112 | Active   |  30 | 1.2.1            |
mvn:org.springframework.osgi/spring-osgi-io/1.2.1
113 | Active   |  30 | 1.2.1            |
mvn:org.springframework.osgi/spring-osgi-web/1.2.1

Regards,
Raman


On 01/31/2016 08:25 AM, Jean-Baptiste Onofré wrote:
> Hi Christian,
> 
> feature core does not depend to spring.
> 
> I don't think the problem is on feature core: the error message says
> it's the spring (osgi.identity) feature (type) that doesn't resolve
> (and it's normal as 3.1.4 is blacklisted and 3.2 excluded from the
> range).
> 
> @Raman, it works fine for me (for a vanilla Karaf): if I don't
> feature:install spring-dm, I have the 3.2.14 Spring features installed:
> 
> 
> 52 | Active   |  30 | 4.0.4            | Apache Karaf :: Bundle ::
> SpringStateService
> 53 | Active   |  30 | 4.0.4            | Apache Karaf :: Deployer ::
> Spring
> 54 | Active   |  30 | 1.0.0.6          | Apache ServiceMix :: Bundles
> :: aopalliance
> 55 | Active   |  30 | 3.2.0.1          | Apache ServiceMix :: Bundles
> :: cglib
> 56 | Active   |  30 | 3.2.14.RELEASE_1 | Apache ServiceMix :: Bundles
> :: spring-aop
> 57 | Active   |  30 | 3.2.14.RELEASE_1 | Apache ServiceMix :: Bundles
> :: spring-beans
> 58 | Active   |  30 | 3.2.14.RELEASE_1 | Apache ServiceMix :: Bundles
> :: spring-context
> 59 | Active   |  30 | 3.2.14.RELEASE_1 | Apache ServiceMix :: Bundles
> :: spring-context-support
> 60 | Active   |  30 | 3.2.14.RELEASE_1 | Apache ServiceMix :: Bundles
> :: spring-core
> 61 | Active   |  30 | 3.2.14.RELEASE_1 | Apache ServiceMix :: Bundles
> :: spring-expression
> 
> and:
> 
> spring-dm       | 1.2.1            | x        | Started | spring-4.0.4
>  | Spring DM support
> spring          | 3.2.14.RELEASE_1 |          | Started | spring-4.0.4
>  | Spring 3.2.x support
> 
> IMHO, you have another feature installed (or transitively installed)
> that limit the range to Spring 3.1.x.
> 
> What features do you have installed ?
> 
> Regards
> JB
> 
> On 01/31/2016 12:48 PM, Christian Schneider wrote:
>>  From the error message I would say that the karaf feature core bundle
>> limits the spring release to <3.2.0. So the resolver can not choose a
>> higher version.
>>
>> Christian
>>
>>
>> 2016-01-31 2:29 GMT+01:00 Raman Gupta <rocketra...@gmail.com
>> <mailto:rocketra...@gmail.com>>:
>>
>>     I'm loading the feature spring-dm-web into a vanilla karaf 4.0.4
>>     instance. Karaf insists on loading the Spring 3.1.4 bundles even
>>     though the spring-dm-web feature references a Spring range that
>> allows
>>     a 3.2 version:
>>
>>     Feature depends on:
>>        spring-dm 0.0.0
>>        spring-web [2.5.6,4)
>>        http 0.0.0
>>
>>     Why is Karaf satisfying the spring-web [2.5.6,4) dependency with
>>     Spring 3.1.4 when Spring 3.2.14.RELEASE_1 is available in the same
>>     features repo?
>>
>>     In addition, blacklisting 3.1.4 does not help -- Karaf still
>> attempts
>>     to resolve the dependency with the same version, and fails:
>>
>>     2016-01-30 19:21:26,192 | ERROR | nsole user karaf | ShellUtil
>>                      | 44 - org.apache.karaf.shell.core - 4.0.4 |
>> Exception
>>     caught while executing command
>>     org.osgi.service.resolver.ResolutionException: Unable to resolve
>> root:
>>     missing requirement [root] osgi.identity; osgi.identity=spring;
>>     type=karaf.feature; version="[3.1.4.RELEASE,3.2.0)"
>>
>>     Regards,
>>     Raman
>>
>>
>>
>>
>> -- 
>> -- 
>> Christian Schneider
>> http://www.liquid-reality.de
>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>
>>
>>
>> Open Source Architect
>> http://www.talend.com
>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>
>>
> 

Reply via email to