1 Reply Latest reply on Feb 7, 2012 6:26 PM by Dustin S.

    Uses conflict only resolved after refresh or restart

    Dustin S. Newbie

      Hi,

       

      I have a uses conflict that only seems to be able to be resolve by restarting the bus or refreshing the lesser versions bundle.

       

      karaf@root> osgi:install -s mvn:org.apache.commons/com.springsource.org.apache.commons.lang/2.5.0
      Bundle ID: 215
      karaf@root> osgi:install -s wrap:mvn:org.jasypt/jasypt/1.9.0
      Bundle ID: 216
      karaf@root> osgi:install -s wrap:mvn:org.jasypt/jasypt-spring3/1.9.0
      Bundle ID: 217
      karaf@root> osgi:install -s mvn:org.apache.log4j/com.springsource.org.apache.log4j/1.2.16
      Bundle ID: 218
      karaf@root> osgi:install -s wrap:mvn:jcs/jcs/1.3
      Bundle ID: 219
      karaf@root> osgi:install -s mvn:edu.utah.further.core/core-api/1.1.0-SNAPSHOT
      Bundle ID: 220
      karaf@root> osgi:install -s mvn:edu.utah.further.core/core-metadata/1.1.0-SNAPSHOT
      Bundle ID: 221
      karaf@root> osgi:install -s mvn:edu.utah.further.core/core-util/1.1.0-SNAPSHOT
      Error executing command: Unable to resolve module edu.utah.further.core.util [222.0] because it is exposed to package 'org.apache.commons.lang.builder' from com.springsource.org.apache.commons.lang [215.0] and org.apache.servicemix.bundles.commons-lang [60.0] via two dependency chains.
      
      Chain 1:
        edu.utah.further.core.util [222.0]
          import: (&(package=org.apache.commons.lang.builder)(version>=2.5.0)(!(version>=3.0.0)))
           |
          export: package=org.apache.commons.lang.builder
        com.springsource.org.apache.commons.lang [215.0]
      
      Chain 2:
        edu.utah.further.core.util [222.0]
          import: (package=org.jasypt.util.text)
           |
          export: package=org.jasypt.util.text; uses:=org.apache.commons.lang
        org.apache.servicemix.bundles.jasypt [59.0]
          import: (&(package=org.apache.commons.lang)(version>=2.1.0)(!(version>=3.0.0)))
           |
          export: package=org.apache.commons.lang; uses:=org.apache.commons.lang.builder
          export: package=org.apache.commons.lang.builder
        org.apache.servicemix.bundles.commons-lang [60.0]
      karaf@root>
      

      I understand the error because there are two versions of commons lang but why won't it bind to the latest?

       

      Refreshing works:

       

      karaf@root> refresh 60
      karaf@root> start 222
      

       

      [ 222] [*Active*     ] [Created     ] [Failed ] [   60] further-core-util (1.1.0.SNAPSHOT)
      

       

      karaf@root> imports 222
      Apache Commons Lang (215): org.apache.commons.lang; version=2.5.0
      Apache Commons Lang (215): org.apache.commons.lang.builder; version=2.5.0
      

       

      Any help?

       

      Thanks,

      Dustin

       

      Edited by: dustin on Feb 7, 2012 10:39 PM