[
https://issues.apache.org/jira/browse/FELIX-6365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17243019#comment-17243019
]
Konrad Windszus edited comment on FELIX-6365 at 12/3/20, 8:51 AM:
------------------------------------------------------------------
That indeed seems to be the case. Clicking "Update" button for 2.12.3.SNAPSHOT
in the Web Console works, but clicking on the general "Install/Update..."
button at the top doesn't!
The problem is that the sling-maven-plugin also relies on the Web Console ReST
API for updating a bundle
(https://github.com/apache/sling-maven-plugin/blob/ee08451c880cc8cdc554b4cf8964c35792d75326/sling-maven-plugin/src/main/java/org/apache/sling/maven/bundlesupport/deploy/method/FelixPostDeployMethod.java#L39)
without explicitly stating a BSN or version (just the file)..
was (Author: kwin):
That indeed seems to be the case. Clicking "Update" button for 2.12.3.SNAPSHOT
in the Web Console works, but clicking on the general "Install/Update..."
button at the top doesn't!
> 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: Bug
> 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)