Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4478

Resolution failure with fragments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • Resolver
    • None

    Description

      I'm having problems with fragments when using the resolver api. Those bundles are working fine with the framework resolver though, but I have currently no idea where the difference is.

      The first problem is when I have a fragment which specifies packages which are imported and exported at the same time.
      I end up with the following exception:

      Error executing command: Uses constraint violation. Unable to resolve resource org.apache.karaf.shell.console [org.apache.karaf.shell.console/4.0.0.SNAPSHOT] because it exports package 'org.apache.karaf.shell.commands' and is also exposed to it from resource org.apache.karaf.shell.core [org.apache.karaf.shell.core/4.0.0.SNAPSHOT] via the following dependency chain:
      
        org.apache.karaf.shell.console [org.apache.karaf.shell.console/4.0.0.SNAPSHOT]
          import: (&(osgi.wiring.package=org.apache.karaf.shell.console.completer)(version>=4.0.0)(!(version>=5.0.0)))
           |
          export: osgi.wiring.package: org.apache.karaf.shell.console.completer; uses:=org.apache.karaf.shell.commands
          export: osgi.wiring.package=org.apache.karaf.shell.commands
        org.apache.karaf.shell.core [org.apache.karaf.shell.core/4.0.0.SNAPSHOT]
      

      In the above org.apache.karaf.shell.console is fragment, org.apache.karaf.shell.core is its host and both org.apache.karaf.shell.commands and org.apache.karaf.shell.console.completer packages are imported/exported by the fragment.

      Trying to work around this issue, I removed the imports on the fragment. But I have another exception with different bundles:

      Error executing command: Uses constraint violation. Unable to resolve resource org.apache.karaf.jaas.blueprint.jasypt [org.apache.karaf.jaas.blueprint.jasypt/4.0.0.SNAPSHOT] because it is exposed to package 'org.apache.aries.blueprint' from resources org.apache.aries.blueprint.core [org.apache.aries.blueprint.core/1.4.0] and org.apache.aries.blueprint.core [org.apache.aries.blueprint.core/1.4.0] via two dependency chains.
      
      Chain 1:
        org.apache.karaf.jaas.blueprint.jasypt [org.apache.karaf.jaas.blueprint.jasypt/4.0.0.SNAPSHOT]
          import: (&(osgi.wiring.package=org.apache.aries.blueprint)(version>=1.3.0)(!(version>=2.0.0)))
           |
          export: osgi.wiring.package: org.apache.aries.blueprint
        org.apache.aries.blueprint.core [org.apache.aries.blueprint.core/1.4.0]
      
      Chain 2:
        org.apache.karaf.jaas.blueprint.jasypt [org.apache.karaf.jaas.blueprint.jasypt/4.0.0.SNAPSHOT]
          import: (&(osgi.wiring.package=org.apache.aries.blueprint.ext)(version>=1.1.0)(!(version>=2.0.0)))
           |
          export: osgi.wiring.package: org.apache.aries.blueprint.ext; uses:=org.apache.aries.blueprint
          export: osgi.wiring.package=org.apache.aries.blueprint
        org.apache.aries.blueprint.core [org.apache.aries.blueprint.core/1.4.0]
      

      In the above, the problem is that org.apache.aries.blueprint.core bundle has a fragment attached, and when debugging, I found out that the two chains are actually compatible, but one is using the bundle capability while the other is using the host wrapped capability (which are considered different).

      Not really sure where to look at, especially as i have no problems when actually deploying the bundles.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gnodet Guillaume Nodet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: