[ 
https://issues.apache.org/jira/browse/FELIX-6365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17243010#comment-17243010
 ] 

Karl Pauls commented on FELIX-6365:
-----------------------------------

Hi [~kwin], can you provide a little more detail about the case, please? My 
guess would be that there maybe is another version of the 
com.adobe.cq.core.wcm.components.core installed besides the one you are 
updating and we could be running into an edge case...

> Updating a bundle may lead to "org.osgi.framework.BundleException: Bundle 
> symbolic name and version are not unique"
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-6365
>                 URL: https://issues.apache.org/jira/browse/FELIX-6365
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-6.0.2
>            Reporter: Konrad Windszus
>            Assignee: Karl Pauls
>            Priority: Major
>
> 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
> {code}
> 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)
> {code}
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to