Update not working for my RCP app [message #443081] |
Mon, 23 January 2006 06:08  |
Eclipse User |
|
|
|
I am trying to test update with my RCP application. I have a deployable
version of my app built and ready buy I cannot get update to work. I
followed the RCP book's recipes in chapters 14 and 21. I have created an
update site locally and placed an updated feature (a plug-in with a new
database inside it - so after the update I'll see new data in the catalog)
but then I perform the update action the progress meter sticks at 6% for a
long time and then up pops a dialog that says "No updates for the
currently installed feature(s) found, try again later."
BTW trying later does not help:-)
I have attached the relevant feature and update site .xml files hoping
someone can tell me what I am doing wrong. There is nothing in the .log
file that indicates any problems.
Any help or advice would be appreciated.
Thanks,
Ian
My udate action code looks like this:
----8<----
@Override
public void run () {
BusyIndicator.showWhile(myWindow.getShell().getDisplay(), new
Runnable () {
public void run () {
UpdateJob job = new UpdateJob ("Searching for updates",
false, false);
UpdateManagerUI.openInstaller (myWindow.getShell(), job);
}
});
}
---->8----
My update site.xml file:
----8<----
<?xml version="1.0" encoding="UTF-8"?>
<site>
<description url="file://P:/WizardsFamiliarUpdateSite">
Wizard's Familiar update site
</description>
<feature
url=" features/com.lesliesoftware.wizardsfamiliar.database_feature _2.0.100.jar "
id="com.lesliesoftware.wizardsfamiliar.database_feature" version="2.0.100">
<category name="WFDatabase"/>
</feature>
<category-def name="WFDatabase" label="Wizard's Familiar Database">
<description>
Updates for the Wizard's Familiar database
</description>
</category-def>
</site>
---->8----
Placing file://P:/WizardsFamiliarUpdateSite into my browsers address bar
displays the site directory as expected:
----8<----
File: .project
Directory: features/
File:
com.lesliesoftware.wizardsfamiliar.database_feature_2.0.100. jar
Directory: plugins/
File: com.lesliesoftware.wizardsfamiliar.database_2.0.100.jar
File: site.xml
---->8----
The deployed feature.xml file:
----8<----
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="com.lesliesoftware.wizardsfamiliar.database_feature"
label="Wizard's Familiar Database Feature"
version="2.0.0"
provider-name="Leslie Software"
plugin="com.lesliesoftware.wizardsfamiliar.database">
<description url="http://www.example.com/description">
[Enter Feature Description here.]
</description>
<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>
<license url="http://www.example.com/license">
[Enter License Description here.]
</license>
<url>
<update label="Wizard's Familiar Updates"
url="file://P:/WizardsFamiliarUpdateSite"/>
</url>
<plugin
id="com.lesliesoftware.wizardsfamiliar.database"
download-size="0"
install-size="0"
version="0.0.0"/>
</feature>
---->8----
The feature.xml file for the one in the update site:
----8<----
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="com.lesliesoftware.wizardsfamiliar.database_feature"
label="Wizard's Familiar Database Feature"
version="2.0.100"
provider-name="Leslie Software"
plugin="com.lesliesoftware.wizardsfamiliar.database">
<description url="http://www.example.com/description">
[Enter Feature Description here.]
</description>
<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>
<license url="http://www.example.com/license">
[Enter License Description here.]
</license>
<url>
<update label="Wizard's Familiar Updates"
url="file://P:/WizardsFamiliarUpdateSite"/>
</url>
<plugin
id="com.lesliesoftware.wizardsfamiliar.database"
download-size="0"
install-size="0"
version="0.0.0"/>
</feature>
---->8----
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Back to a more basic question (was Re: Update not working for my RCP app) [message #443351 is a reply to message #443348] |
Fri, 27 January 2006 10:36   |
Eclipse User |
|
|
|
Originally posted by: dorian.birsan.net
Ian,
The updater will only search for updates of the root features (those not
included by others).
Additionally, it can look for patches of any features.
For example, it will check for updates at the update url provided by
> com.lesliesoftware.wizardsfamiliar_feature 2.0.0
but will not check the url provided by
> included features
> com.lesliesoftware.lcommon_feature 1.0.0
However, if the update site for
> com.lesliesoftware.wizardsfamiliar_feature 2.0.0
provides a patch to
> included feature
> com.lesliesoftware.lcommon_feature 1.0.0
it will find that patch.
You can install just the patch of a nested feature, without having to update
the root feature(s).
-Dorian
"Ian Leslie" <lesliesoftware@yahoo.com> wrote in message
news:b55c8782331894dba11cde8c32981079$1@www.eclipse.org...
> I have concluded that when my update site is on the web
> (http://www3.sympatico.ca/laraian/WizardsFamiliarUpdateSite/) the update
> code does find the site but it still does not want to update my feature.
> I'm not getting any further debugging this so I think it is time to ask a
> more basic question: is this supposed to work?
>
> The example in the RCP book has one feature (the application) and that
> feature is the one updated in the example. In my case I have an
> application feature that includes four other features plus its own
> plug-ins. I am providing an update site that contains an update for one
> of those included features not the whole thing.
>
> Should code like this in the update action:
> UpdateJob job = new UpdateJob ("Searching for updates", false, false);
> UpdateManagerUI.openInstaller (myWindow.getShell(), job);
>
> find and update any one of my application's included features? Or does
> that code only check the application's feature? Both my application
> feature and the feature I am trying to update have
> http://www3.sympatico.ca/laraian/WizardsFamiliarUpdateSite/ listed as
> their update site URL.
>
> Thanks,
>
> Ian
>
> ---8<---
> Here is how my RCP application's features are structured:
>
> com.lesliesoftware.wizardsfamiliar_feature 2.0.0
> included features
> com.lesliesoftware.lcommon_feature 1.0.0
> (for some jface extensions, sql utilities etc.)
> com.lesliesoftware.wizardsfamiliar.database_feature 2.0.0
> (provides the database that my application uses)
> org.apache.db.derby_feature 10.0.2.1
> (a wrapper for derby)
> org.eclipse.rcp.more_feature 3.1.1
> (a wapper for the other eclipse plug-ins I am using above
> the standard RCP SDK - this feature includes that feature)
> plug-ins
> various plug-ins that provide views, help, the application itself
> etc.
>
> com.lesliesoftware.lcommon_feature 1.0.0
> included features
> none
> plug-ins
> Seveeral library wrappers for some of my commonly used code
> I have written over the years
>
> com.lesliesoftware.wizardsfamiliar.database_feature 2.0.0
> inluded features
> none
> plug-ins
> com.lesliesoftware.wizardsfamiliar.database 2.0.0
> Contains the database that shipps with the application.
> This needs periodic updating and this is the plug-in I
> am trying to get update to work for.
>
> org.apache.db.derby_feature 10.0.2.1
> inluded features
> none
> plug-ins
> The wrapper plug-in for the derby .jars
>
> org.eclipse.rcp.more_feature 3.1.1
> inluded features
> org.eclipse.rcp 3.1.1
> plug-ins
> The additional plug-ins my application is using from the SDK
> over those provided by the RCP SDK
>
|
|
|
|
Re: Back to a more basic question (was Re: Update not working for my RCP ap [message #443375 is a reply to message #443374] |
Fri, 27 January 2006 12:14   |
Eclipse User |
|
|
|
Does the update feature work in an Eclipse install, using the Install features/plugins mechanism? That will at least give you confidence that you've built the right things. When I put that URL into my Eclipse workspace, it shows me the 2.0.100 feature. However, your site.xml contains absolutely no plugins whatsoever, and thus the feature.xml's references are going to be completely ignored.
When you export an update site in Eclipse, it re-builds the site.xml from scratch from what you've currently selected to update. In other words, if you export Plugin A, and then later export Plugin B, you'll notice that the site.xml doesn't have Plugin A in it any more. What you need to do is export *all* of the required features/plugins in one go.
Alternatively, you can edit the site.xml by hand, and just export individual plugins/features one at a time into the appropriate directories. But most of the problems you're having seem to be because the site.xml doesn't contain what you think it should :-)
<?xml version="1.0" encoding="UTF-8"?>
<site>
<description url="http://www3.sympatico.ca/laraian/WizardsFamiliarUpdateSite/">
Wizards Familiar Update Site
</description>
<feature url=" features/com.lesliesoftware.wizardsfamiliar.database_feature _2.0.100.jar " id="com.lesliesoftware.wizardsfamiliar.database_feature" version="2.0.100">
<category name="WFDatabase"/>
</feature>
<category-def name="WFDatabase" label="Card Database"/>
</site>
[/xml]
Alex.
|
|
|
|
|
Re: Back to a more basic question [message #443382 is a reply to message #443378] |
Fri, 27 January 2006 14:35   |
Eclipse User |
|
|
|
After that experiment I adjusted my code for the add extension action to
search for extensions using my update site (it was still pointing to the
non functioning local site). Still my update action with code like this:
UpdateJob job = new UpdateJob ("Searching for updates", false, false);
UpdateManagerUI.openInstaller (myWindow.getShell(), job);
does not work. But my add extension action with code like this:
UpdateJob job = new UpdateJob ("Seach for new extensions",
getSearchRequest ());
UpdateManagerUI.openInstaller (myWindow.getShell (), job);
private UpdateSearchRequest getSearchRequest () {
// Create the search request
UpdateSearchRequest request = new UpdateSearchRequest (
UpdateSearchRequest.createDefaultSiteSearchCategory (),
new UpdateSearchScope ());
request.addFilter (new BackLevelFilter ());
request.addFilter (new EnvironmentFilter ());
// Create the search scope for the update site
UpdateSearchScope scope = new UpdateSearchScope ();
try {
String homeBase = System.getProperty
("wizardsfamiliar.homebase",
"http://www3.sympatico.ca/laraian/WizardsFamiliarUpdateSite/");
URL url = new URL (homeBase);
scope.addSearchSite ("Wizard's Familiar site", url, null);
} catch (MalformedURLException exception) {
// skip bad URLs
}
request.setScope (scope);
return request;
}
Finds the updated feature and installs it as if it were an extension.
This is very cool and so close to what I want. But it did not treat the
new feature / plug-in as an update. After a fresh install my Product
Configuration dialog (as seen from my Manage Extensions action) looks
like this:
p:\InstallTest\WizardsFamiliar
com.lesliesoftware.wizardsfamiliar-feature 2.0.0
Apache Derby 10.0.2.1
Eclipse RCP Plug-ins 3.1.1
Eclipse RCP 3.1.1
LCommon Feature 1.0.0
Wizard's Familiar Database Feature 2.0.0
This is what I expected (note: the nested Eclipse RCP features is how I am
packaging the base RCP plug-ins and the extra ones I needed to add).
After I perform the add extensions action and get the updated feature I
see this:
p:\InstallTest\WizardsFamiliar
com.lesliesoftware.wizardsfamiliar-feature 2.0.0
Apache Derby 10.0.2.1
Eclipse RCP Plug-ins 3.1.1
Eclipse RCP 3.1.1
LCommon Feature 1.0.0
X Wizard's Familiar Database Feature 2.0.0
Wizard's Familiar Database Feature 2.0.100
Where 'X' is a disabled plug-in icon. Things seem to work - the new
database is available and the rest of the application works as expected
but I think the fact that the new version was added instead of updating
the existing feature means that there is something wrong. In fact I am
unable to get the product to restart if I uninstall the new feature.
Does this clue mean anything to any one? Given that I want to update a
feature independently, does that mean I need to restructure my feature
dependencies? If I do that how do I get PDE build to keep working (right
now it relies on the fact the com.lesliesoftware.wizardsfamiliar-feature
contains all the dependencies)? Do I have to update the
com.lesliesoftware.wizardsfamiliar-feature every time I change any of its
dependent features?
Thanks,
Ian
|
|
|
|
|
|
|
|
|
|
|
Re: Back to a more basic question - SOLVED [message #444100 is a reply to message #443999] |
Thu, 09 February 2006 11:09  |
Eclipse User |
|
|
|
Ian Leslie wrote:
> Peter Manahan wrote:
<snip>
>> If you want to update a nested feature without shipping the features up
>> to the root you must use a patch feature.
> Thanks for the clarification. It sounds like to have one feature updated
> more frequently than the rest of the features in my product I should not
> make it nested but have it separate. Right now my PDE build packages the
> build results into one nice .zip file for the prodcut feature. Will I
> encounter problems changing the PDE build so that it will take the product
> feature and the database feature as peers and package them into one .zip
> file?
<snip>
Yippeeee!
I want to thank everyone that helped me with this. Peter's last mail was
the key to the last of my problems. I stopped including the database
feature in the list of included features for my application plug-in's
feature and made them peers with each other. The data access plug-in in
the application still depends on the database plug-in but their features
are no longer nested. The PDE build was a breeze to update. All I did
was edit my wizardsfamiliar.product.feature's feature.xml to add the
database feature along side the application feature and
eclipse.platform.launchers that was already there. Builds worked great
and the .zip files contained all the right parts and the installs worked.
Better yet when I performed an update action (now using the original code
from the RCP book) it worked. The feature was updated and the UI for
managing extensions showed the expected tree.
Thanks again,
Ian
|
|
|