Restart after an update? [message #523513] |
Fri, 26 March 2010 16:28 |
Roel De Nijs Messages: 28 Registered: March 2010 |
Junior Member |
|
|
Hi,
We have an Eclipse RCP product (application) and we need an automatic update mechanism which updates our application at startup. To fulfill this requirement we use the code found on this link.
This code worked well, but now we are experiencing some weird behavior: when I export the product, I'm able to run the application. Then I build a new update site, so a new update becomes available (the version of our custom plugins are defined as 1.0.0.qualifier). Then I start the application again, the automatic update manager notices the updates and retrieves the update jar files and then I expect a restart, but that does not happen every time, so the updates are not visible. When I restart the application again, I get thes exceptions:
!ENTRY org.eclipse.osgi 2 0 2010-03-26 17:18:47.062
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-03-26 17:18:47.062
!MESSAGE Bundle be.aclvb.client.application_1.0.0.201003161350 [2] was not resolved.
!SUBENTRY 2 be.aclvb.client.application 2 0 2010-03-26 17:18:47.062
!MESSAGE Another singleton version selected: be.aclvb.client.application_1.0.0.201003161351
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-03-26 17:18:47.062
!MESSAGE Bundle be.aclvb.framework.client_1.0.0.201003161350 [3] was not resolved.
!SUBENTRY 2 be.aclvb.framework.client 2 0 2010-03-26 17:18:47.062
!MESSAGE Another singleton version selected: be.aclvb.framework.client_1.0.0.201003161351
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-03-26 17:18:47.062
!MESSAGE Bundle be.aclvb.leden.client_1.0.0.201003161350 [10] was not resolved.
!SUBENTRY 2 be.aclvb.leden.client 2 0 2010-03-26 17:18:47.062
!MESSAGE Another singleton version selected: be.aclvb.leden.client_1.0.0.201003161351
I tried it also with a demo-project (the mail application) and I experienced the same weird behavior.
I don't have any clue about why the SiteManager.getLocalSite().save() method does not return always true when updates are found, that's what I would expect (every custom plugin has a higher version than the current one)
Any comments, suggestions or tips are highly appreciated.
Kind regards,
Roel
|
|
|
|
|
Re: Restart after an update? [message #523834 is a reply to message #523513] |
Mon, 29 March 2010 14:51 |
Roel De Nijs Messages: 28 Registered: March 2010 |
Junior Member |
|
|
Hi Vimal,
First of all thanks for your swift reply.
I have changed the policy to MANAGED-ONLY (according to the documentation only plugins from the features define by this site are run). So why eclipse is trying to load other plugins (with a lower version) is a complete mistery to me
When I use the default policy (USER-EXCLUDE) the platform.xml is updated correctly (without any code change, so I don't think the code change you mentioned is necessary). It looks like this
list="plugins/be.aclvb.framework.common_1.0.0.201003291609.jar,
plugins/be.aclvb.leden.client_1.0.0.201003291609.jar,
plugins/be.aclvb.client.application_1.0.0.201003291609.jar,
plugins/be.aclvb.framework.client_1.0.0.201003291609.jar,
plugins/be.aclvb.leden.common_1.0.0.201003291609.jar"
policy="USER-EXCLUDE"
And the feature is also updated correctly to the next version (version="1.0.0.201003291618"), but for some (unknown) reason eclipse tries to resolve the "old" bundles (jars).
If you start the console and run ss, i'll see the following:
- the old bundles (previous version) have status installed
- the new bundles (next version, from update) have status active or lazy
I don't have any clue about this (in my opinion) strange behavior.
Kind regards,
Roel
|
|
|
Re: Restart after an update? [message #523837 is a reply to message #523802] |
Mon, 29 March 2010 14:56 |
Roel De Nijs Messages: 28 Registered: March 2010 |
Junior Member |
|
|
Christian wrote on Mon, 29 March 2010 04:02 |
wouldn't the error imply that it would be better to change the version
numbers of the plugins/features ... after all that date qualifier is
afaik ignored ... so for rcp those plugins look the same ..
|
According to the implementation of method PluginVersionIdentifier.isGreaterThan(PluginVersionIdentifie r id) all parts (even the qualifier one) are taken into account to check if a feature/plugin has a greater version than another feature/plugin.
If this wouldn't work, I would not be able to update and the update process works as expected: available update is noticed, necessary files are downloaded and adjustments to plugin.xml are made. The only question still standing: why does eclipse keep loading the old versions of these plugins.
Kind regards,
Roel
[Updated on: Mon, 29 March 2010 14:57] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03763 seconds