I added updating to an RCP application using the simple setup described here: http://wiki.eclipse.org/Equinox/p2/Adding_Self-Update_to_an_ RCP_Application.
This works -- except that old bundles never get removed (from the plugins dir and the bundles.info file), and the following errors are logged every time the application is started:
!ENTRY test 4 0 2010-11-25 00:41:53.562
!MESSAGE
!STACK 0
org.osgi.framework.BundleException: The bundle "test_1.0.0.201011250006 [159]" could not be resolved. Reason: Another singleton version selected: test_1.0.0.201011250029
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1317)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1301)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:319)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
This doesn't affect the application (only the latest version of each bundle is listed in the About dialog). Also, I noticed that obsolete features are removed from the features dir right away.
In my .product I have this:
<features>
<feature id="org.eclipse.rcp"/>
<feature id="org.eclipse.equinox.p2.user.ui"/>
...
</features>
<configurations>
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" />
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
<property name="org.eclipse.update.reconcile" value="false"/>
<plugin id="org.eclipse.update.configurator" autoStart="true" startLevel="4"/>
...
</configurations>
Anyone else encountered this issue?