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

Updating a bundle may lead to "org.osgi.framework.BundleException: Bundle symbolic name and version are not unique"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • webconsole-4.5.4
    • None
    • Web Console
    • None

    Description

      When updating a bundle (e.g. triggered via the Web Console Plugin, https://github.com/apache/felix-dev/blob/master/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java) the following can be observed

      03.12.2020 09:01:27.614 *ERROR* [FelixLogListener] org.apache.felix.http.jetty Cannot install or update bundle from /var/folders/rm/vlg2h6m16mb0f65djmnb12xr0000gq/T/install6626908868226297619.tmp (org.apache.felix.log.LogException: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: com.adobe.cq.core.wcm.components.core:2.12.3.SNAPSHOT)
      org.apache.felix.log.LogException: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: com.adobe.cq.core.wcm.components.core:2.12.3.SNAPSHOT
      	at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1337)
      	at org.apache.felix.framework.BundleImpl.revise(BundleImpl.java:1219)
      	at org.apache.felix.framework.Felix.updateBundle(Felix.java:2550)
      	at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:1018)
      	at org.apache.felix.webconsole.internal.core.UpdateHelper.doRun(UpdateHelper.java:60) [org.apache.felix.webconsole:4.5.4]
      	at org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.doRun(BaseUpdateInstallHelper.java:104) [org.apache.felix.webconsole:4.5.4]
      	at org.apache.felix.webconsole.internal.core.UpdateHelper.doRun(UpdateHelper.java:74) [org.apache.felix.webconsole:4.5.4]
      	at org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.run(BaseUpdateInstallHelper.java:177) [org.apache.felix.webconsole:4.5.4]
      	at java.base/java.lang.Thread.run(Thread.java:834)
      

      This happens when you try to trigger an update a second time with the same version and BSN. Although this is clearly stated in the exception message it is unclear why this is not allowed. In general a version may look like this "1.0.0.SNAPSHOT" (recommended by bnd, https://github.com/bndtools/bnd/tree/master/maven/bnd-maven-plugin#reproducible-builds), obviously this version does not necessarily change between deployments.
      IMHO the check from Felix should be removed, as also https://docs.osgi.org/javadoc/osgi.core/7.0.0/org/osgi/framework/Bundle.html#update-java.io.InputStream- does not state anything about not being allowed to update a bundle with same BSN and version.

      Attachments

        Issue Links

          Activity

            People

              karlpauls Karl Pauls
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: