J. Brébec created KARAF-4159:
--------------------------------

             Summary: FeatureResolver: Wrond dependencies installed
                 Key: KARAF-4159
                 URL: https://issues.apache.org/jira/browse/KARAF-4159
             Project: Karaf
          Issue Type: Bug
          Components: karaf-feature
    Affects Versions: 4.0.3
         Environment: Reproduced in MacOS (JRE1.8) or Windows 7 (JRE 1.7)
            Reporter: J. Brébec
            Priority: Critical


In a fresh Karaf 4.0.3 installation

1. install spring/3.2.14.RELEASE_1
{code}
feature:install spring/3.2.14.RELEASE_1
{code}

2. test an installation of spring-dm. Randomly, Karaf try to install spring 
3.1.4.RELEASE
{code}
karaf@root()> feature:install -t -v spring-dm
Adding features: spring-dm/[1.2.1,1.2.1]
Changes to perform:
  Region: root
    Bundles to install:
      mvn:org.apache.karaf.bundle/org.apache.karaf.bundle.springstate/4.0.3
      
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/3.0_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
      mvn:org.springframework.osgi/spring-osgi-core/1.2.1
      mvn:org.springframework.osgi/spring-osgi-extender/1.2.1
      mvn:org.springframework.osgi/spring-osgi-annotation/1.2.1
      mvn:org.springframework.osgi/spring-osgi-io/1.2.1
  Bundles to refresh:
    org.apache.servicemix.bundles.spring-aop/3.2.14.RELEASE_1 (Wired to 
org.apache.servicemix.bundles.spring-core/3.2.14.RELEASE_1 which is being 
refreshed)
    org.apache.servicemix.bundles.spring-beans/3.2.14.RELEASE_1 (Wired to 
org.apache.servicemix.bundles.spring-core/3.2.14.RELEASE_1 which is being 
refreshed)
    org.apache.servicemix.bundles.spring-context/3.2.14.RELEASE_1 (Wired to 
org.apache.servicemix.bundles.spring-aop/3.2.14.RELEASE_1 which is being 
refreshed)
    org.apache.servicemix.bundles.spring-context-support/3.2.14.RELEASE_1 
(Wired to org.apache.servicemix.bundles.spring-beans/3.2.14.RELEASE_1 which is 
being refreshed)
    org.apache.servicemix.bundles.spring-core/3.2.14.RELEASE_1 (Should be wired 
to: org.apache.servicemix.bundles.cglib/3.0.0.1 (through 
[org.apache.servicemix.bundles.spring-core/3.2.14.RELEASE_1] 
osgi.wiring.package; 
filter:="(&(osgi.wiring.package=net.sf.cglib.beans)(version>=3.0.0)(!(version>=4.0.0)))";
 resolution:=optional))
    org.apache.servicemix.bundles.spring-expression/3.2.14.RELEASE_1 (Wired to 
org.apache.servicemix.bundles.spring-core/3.2.14.RELEASE_1 which is being 
refreshed)
{code} 

Note: This can happen too when installing spring and spring-dm in the same 
command or in a boot feature (staged or not).

3. install any unrelated feature (when spring-dm has installed spring 3.1) : 
Karaf uninstall spring 3.1 and refresh the world

{code}
karaf@root()> feature:install -t -v scheduler 
Adding features: scheduler/[4.0.3,4.0.3]
Changes to perform:
  Region: root
    Bundles to uninstall:
      org.springframework.expression/3.1.4.RELEASE
      org.springframework.context.support/3.1.4.RELEASE
      org.springframework.core/3.1.4.RELEASE
      org.springframework.beans/3.1.4.RELEASE
      org.springframework.context/3.1.4.RELEASE
      org.springframework.aop/3.1.4.RELEASE
      org.springframework.asm/3.1.4.RELEASE
    Bundles to install:
      mvn:org.apache.karaf.scheduler/org.apache.karaf.scheduler.core/4.0.3
  Bundles to refresh:
    org.springframework.aop/3.1.4.RELEASE (Bundle will be uninstalled)
    org.springframework.asm/3.1.4.RELEASE (Bundle will be uninstalled)
    org.springframework.beans/3.1.4.RELEASE (Bundle will be uninstalled)
    org.springframework.context/3.1.4.RELEASE (Bundle will be uninstalled)
    org.springframework.context.support/3.1.4.RELEASE (Bundle will be 
uninstalled)
    org.springframework.core/3.1.4.RELEASE (Bundle will be uninstalled)
    org.springframework.expression/3.1.4.RELEASE (Bundle will be uninstalled)
{code}

this is critical in my environment : a lot of dependencies don't work with two 
versions of spring in the container. moreover, installing any feature after 
that uninstall/refresh a lot of bundle (it uninstall unrelated bundle too)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to