Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-4159

FeatureResolver: Wrong dependencies installed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 4.0.3
    • 4.0.4
    • karaf
    • None
    • Reproduced in MacOS (JRE1.8) or Windows 7 (JRE 1.7)

    Description

      In a fresh Karaf 4.0.3 installation

      1. install spring/3.2.14.RELEASE_1

      feature:install spring/3.2.14.RELEASE_1
      

      2. test an installation of spring-dm. Randomly, Karaf try to install spring 3.1.4.RELEASE

      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)
      

      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

      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)
      

      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)

      Attachments

        Issue Links

          Activity

            People

              gnodet Guillaume Nodet
              j3rem1e J. Brébec
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: