Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Update not working for my RCP app
Update not working for my RCP app [message #443081] Mon, 23 January 2006 06:08 Go to next message
Eclipse UserFriend
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&apos;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&apos;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&apos;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&apos;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: Update not working for my RCP app [message #443086 is a reply to message #443081] Mon, 23 January 2006 08:04 Go to previous messageGo to next message
Eclipse UserFriend
What is the version of your previouse installation? Your current is
2.0.100.

Stefan

Ian Leslie wrote:
> 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&apos;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&apos;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&apos;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&apos;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: Update not working for my RCP app [message #443087 is a reply to message #443081] Mon, 23 January 2006 08:39 Go to previous messageGo to next message
Eclipse UserFriend
You have to change the plugin versions as well as the feature versions. It looks like that although the feature is updated, the plugin version is still 0.0.0. Thus, it will think it's got the right version of the plugins and not bother with an update. (It's questionable whether it should update the feature even if there are no plugins that change, but that's really quite unlikely to happen in real life.)
Re: Update not working for my RCP app [message #443097 is a reply to message #443086] Mon, 23 January 2006 13:31 Go to previous messageGo to next message
Eclipse UserFriend
Stefan Langer wrote:

> What is the version of your previouse installation? Your current is
> 2.0.100.

The version in my test install is 2.0.0.

Ian
Re: Update not working for my RCP app [message #443103 is a reply to message #443097] Mon, 23 January 2006 15:48 Go to previous messageGo to next message
Eclipse UserFriend
Ian Leslie wrote:

> Stefan Langer wrote:

>> What is the version of your previouse installation? Your current is
>> 2.0.100.

> The version in my test install is 2.0.0.

To clarify I have performed a build and installed it (and it runs) which
has a database plug-in and feature with a version 2.0.0. I have created
an update site which hosts a new database plug-in and feature with a
version of 2.0.100.

When I run the application and perform my update command I think it should
notice that it is running version 2.0.0 of the database feature and that
there is a newer version available for downloading.

Ian
Re: Update not working for my RCP app [message #443105 is a reply to message #443087] Mon, 23 January 2006 16:15 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the advice - I think I did that and I still have no joy. I
still do not see what I am missing. I even tried to take the string used
in the PDE feature editor as the "Update Site URL" and create a url
programmatically to it - worked fine.

I'm stumped at the moment. I hope someone notices something wrong with
what I am doing or inspiration strikes me later today.

Thanks,

Ian

Here is what I have now.

In my installed and working program directory I have the feature.xml for
" ...\features\com.lesliesoftware.wizardsfamiliar.database_fea ture_2.0.0 "
---8<---
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="com.lesliesoftware.wizardsfamiliar.database_feature"
label="Wizard&apos;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="Wizards Familiar Update Site"
url="file://P:/WizardsFamiliarUpdateSite"/>
</url>

<plugin
id="com.lesliesoftware.wizardsfamiliar.database"
download-size="0"
install-size="0"
version="2.0.0"/>

</feature>
--->8---

In my installed and working program directory I have the manifest.mf for
the corresponding plug-in:
---8<---
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Wizard's Familiar Database Plug-in
Bundle-SymbolicName: com.lesliesoftware.wizardsfamiliar.database
Bundle-Version: 2.0.0
Bundle-ClassPath: Cards.jar
Bundle-Vendor: Leslie Software
Bundle-Localization: plugin
--->8---

In my update site I have the featue.xml from
" features/com.lesliesoftware.wizardsfamiliar.database_feature _2.0.100.jar ":
---8<---
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="com.lesliesoftware.wizardsfamiliar.database_feature"
label="Wizard&apos;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="Wizards Familiar Update Site"
url="file://P:/WizardsFamiliarUpdateSite"/>
</url>

<plugin
id="com.lesliesoftware.wizardsfamiliar.database"
download-size="0"
install-size="0"
version="2.0.100"/>

</feature>
--->8---

And the corresponding maifest.mf for the plug-in
" plugins/com.lesliesoftware.wizardsfamiliar.database_2.0.100. jar ":
---8<---
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Wizard's Familiar Database Plug-in
Bundle-SymbolicName: com.lesliesoftware.wizardsfamiliar.database
Bundle-Version: 2.0.100
Bundle-ClassPath: Cards.jar
Bundle-Vendor: Leslie Software
Bundle-Localization: plugin
--->8---

And my update site looks like this:
---8<---
<?xml version="1.0" encoding="UTF-8"?>
<site>
<description url="file:///P:/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>
--->8---
Re: Update not working for my RCP app [message #443149 is a reply to message #443105] Mon, 23 January 2006 17:06 Go to previous messageGo to next message
Eclipse UserFriend
Try changing the update url to:

<url>
<update label="Wizards Familiar Update Site"
url="file:///P:/WizardsFamiliarUpdateSite/"/>
</url>

(Added slash after file: and another after the end of the url).

Also, make sure your update/install preferences
(Window->Preferences->Install/Update)
are set properly to let you see the new version, you need to set the
equivalent/compatible
correctly.


"Ian Leslie" <lesliesoftware@yahoo.com> wrote in message
news:416b11f378cf5de375f07c329330dde6$1@www.eclipse.org...
> Thanks for the advice - I think I did that and I still have no joy. I
> still do not see what I am missing. I even tried to take the string used
> in the PDE feature editor as the "Update Site URL" and create a url
> programmatically to it - worked fine.
> I'm stumped at the moment. I hope someone notices something wrong with
> what I am doing or inspiration strikes me later today.
>
> Thanks,
>
> Ian
>
> Here is what I have now.
>
> In my installed and working program directory I have the feature.xml for
> " ...\features\com.lesliesoftware.wizardsfamiliar.database_fea ture_2.0.0 "
> ---8<---
> <?xml version="1.0" encoding="UTF-8"?>
> <feature
> id="com.lesliesoftware.wizardsfamiliar.database_feature"
> label="Wizard&apos;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="Wizards Familiar Update Site"
> url="file://P:/WizardsFamiliarUpdateSite"/>
> </url>
>
> <plugin
> id="com.lesliesoftware.wizardsfamiliar.database"
> download-size="0"
> install-size="0"
> version="2.0.0"/>
>
> </feature>
> --->8---
>
> In my installed and working program directory I have the manifest.mf for
> the corresponding plug-in:
> ---8<---
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Wizard's Familiar Database Plug-in
> Bundle-SymbolicName: com.lesliesoftware.wizardsfamiliar.database
> Bundle-Version: 2.0.0
> Bundle-ClassPath: Cards.jar
> Bundle-Vendor: Leslie Software
> Bundle-Localization: plugin
> --->8---
>
> In my update site I have the featue.xml from
> " features/com.lesliesoftware.wizardsfamiliar.database_feature _2.0.100.jar ":
> ---8<---
> <?xml version="1.0" encoding="UTF-8"?>
> <feature
> id="com.lesliesoftware.wizardsfamiliar.database_feature"
> label="Wizard&apos;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="Wizards Familiar Update Site"
> url="file://P:/WizardsFamiliarUpdateSite"/>
> </url>
>
> <plugin
> id="com.lesliesoftware.wizardsfamiliar.database"
> download-size="0"
> install-size="0"
> version="2.0.100"/>
>
> </feature>
> --->8---
>
> And the corresponding maifest.mf for the plug-in
> " plugins/com.lesliesoftware.wizardsfamiliar.database_2.0.100. jar ":
> ---8<---
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Wizard's Familiar Database Plug-in
> Bundle-SymbolicName: com.lesliesoftware.wizardsfamiliar.database
> Bundle-Version: 2.0.100
> Bundle-ClassPath: Cards.jar
> Bundle-Vendor: Leslie Software
> Bundle-Localization: plugin
> --->8---
>
> And my update site looks like this:
> ---8<---
> <?xml version="1.0" encoding="UTF-8"?>
> <site>
> <description url="file:///P:/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>
> --->8---
>
>
Re: Update not working for my RCP app [message #443162 is a reply to message #443149] Tue, 24 January 2006 06:44 Go to previous messageGo to next message
Eclipse UserFriend
Gail Jakubowski wrote:

> Try changing the update url to:

> <url>
> <update label="Wizards Familiar Update Site"
> url="file:///P:/WizardsFamiliarUpdateSite/"/>
> </url>

> (Added slash after file: and another after the end of the url).

> Also, make sure your update/install preferences
> (Window->Preferences->Install/Update)
> are set properly to let you see the new version, you need to set the
> equivalent/compatible
> correctly.

I'm sorry to say that made no difference. I see the same thing progress
indicator goes to 6% and waits for a while then informs there were no
updates found. As far as I can tell the preference should find my 2.0.100
udpate with either seting but I tried them both to be sure.

I notice that the UpdateJob code has some debug statements in it. Is
there a way to turn on those debug statemenets in a production build? I
think I read there was but I cannot find how to do it. It looks like most
of the real work goes on inside UpdateSearchRequest.performSeach but it
has no debug statements. I would love to be able to set break points and
debug this but I don't know how to get update to function during a debug
session.

Ian
Re: Update not working for my RCP app [message #443189 is a reply to message #443081] Tue, 24 January 2006 08:22 Go to previous messageGo to next message
Eclipse UserFriend
Ian Leslie wrote:
> 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 could never get Search for Updates to work with a local site (I could
only find service increments if I "Install new features"). Maybe I've
been doing something incorrect, but I have opened a bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=124997


Later,
PW
Re: Update not working for my RCP app [message #443208 is a reply to message #443189] Tue, 24 January 2006 16:56 Go to previous messageGo to next message
Eclipse UserFriend
Paul Webster wrote:

> I could never get Search for Updates to work with a local site (I could
> only find service increments if I "Install new features"). Maybe I've
> been doing something incorrect, but I have opened a bug
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=124997

Thanks for experimenting - and logging a bug. I am now watching the bug
too. Hopefully some light can be shed on this. While I would like there
to be something I can do in 3.1.1, I would settle for it getting fixed in
3.2.

Thanks again,

Ian
Re: Update not working for my RCP app [message #443230 is a reply to message #443081] Tue, 24 January 2006 17:15 Go to previous messageGo to next message
Eclipse UserFriend
I have been doing some debugging (the old fasioned way ala printf - in
this case println) and I found some unexpected things. I was expecting
the update mechanism to look for updates for all features but it does not
appear to be doing that. In my application I have the following features:
- the RCP application
- a feature for the Derby wrapper plug-in I created
- a feature for the additinal plug-ins I am using over and above the
standard RCP SDK plug-ins (this feature includes the standard RCP SDK
feature)
- a feature for the actual Derby database that my application needs

Right now I am trying to get the update mechanism to perform updates for
the database feature to test distributing new versions of the database.

My update action (from the RCP book) boils down to this:
UpdateJob job = new UpdateJob ("Searching for updates", false, false);
UpdateManagerUI.openInstaller (myWindow.getShell(), job);

After stepping through all this I think that the real work gets done in
UpdateSearchRequest.performSearch. So I made copies of what I needed into
my udate action so I could log what was happening (there is no built in
debug code or logging here I could just use). The method starts with code
like this:

public void performSearch(
...
IUpdateSearchQuery[] queries = category.getQueries();
IUpdateSearchSite[] candidates = scope.getSearchSites();

After adding code to log what was in those two arrays This is what I
recived when running in my installed location:
There are 1 queries

org.eclipse.update.internal.search.UpdatesSearchCategory$UpdateQuery@18706f6
label: Wizard's Familiar Updates
mapping id: com.lesliesoftware.wizardsfamiliar_feature
url: file://P:/WizardsFamiliarUpdateSite
There are 0 candidate sites

I am by no means an expert in how this code should work but to me it looks
like it is only updating one feature (my main application feature). Is
that the correct?

Later in the method it loops over the queries array checking for updates
from each candidate in the candidates array. To me it looks like the code
is not seeing all my application's features and it does not find any
search site candidates to check for updates either so if it did find all
my features it still would not have any sites to check against.

Does this extra information help expose what I need to do? Should I be
trying to create my own queries and site candiates for the update code to
look at?

Thanks,

Ian
Re: Update not working for my RCP app [message #443252 is a reply to message #443230] Wed, 25 January 2006 08:49 Go to previous messageGo to next message
Eclipse UserFriend
Oh, your investigation confirms some of the docs I read about testing
with a local site. They only mention using Find and Install new
features, never update. It might be that updating from a local site is
an "enhancement" that hasn't been completed, because there wasn't an
obvious way to keep the file candidate site.

If you wouldn't mind, could copy most of your investigation into the bug
report (so it's captured related to this problem).

Later,
PW
Back to a more basic question (was Re: Update not working for my RCP app) [message #443348 is a reply to message #443081] Fri, 27 January 2006 09:06 Go to previous messageGo to next message
Eclipse UserFriend
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 app) [message #443351 is a reply to message #443348] Fri, 27 January 2006 10:36 Go to previous messageGo to next message
Eclipse UserFriend
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 app) [message #443374 is a reply to message #443351] Fri, 27 January 2006 11:50 Go to previous messageGo to next message
Eclipse UserFriend
dorian birsan wrote:
> 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).

Thanks for the clarification. What you describe is not working for me.
The update url for my root feature is
http://www3.sympatico.ca/laraian/WizardsFamiliarUpdateSite/ and that site
has an update for com.lesliesoftware.wizardsfamiliar.database_feature to
version 2.0.100. The installed version in my test is 2.0.0 and it is one
of the included features for my root feature.

Any ideas why that would not be working? I see not errors in the log (or
the console when I run with the console turned on) and the update action
results in a dialog that says there were no updates found.

Any help or advice would be appriciated.

Thanks,

Ian
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 Go to previous messageGo to next message
Eclipse UserFriend
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 (was Re: Update not working for my RCP ap [message #443377 is a reply to message #443375] Fri, 27 January 2006 12:19 Go to previous messageGo to next message
Eclipse UserFriend
D'oh. I'm having an off day. Ignore what I said there ...

Alex.
Re: Back to a more basic question (was Re: Update not working for my RCP ap [message #443378 is a reply to message #443375] Fri, 27 January 2006 13:34 Go to previous messageGo to next message
Eclipse UserFriend
Alex Blewitt wrote:

> 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.
<stuff you asked us to ignore snipped>

Great idea! I tried it: I was able to create a site entry for my site and
the Eclipse IDE happily read the site and offered to download the new
feature. So, I asked it to. Upon restart I had my new plug-in and
feature installed in my IDE install dir - so it worked - cool. I was able
to disable the feature and then uninstall it. It all worked like a charm.

So I think that shows that my site is fine. Now I wonder why this is not
working in my application and what code changes do I need to make for this
to work?

Any help or advise would be appreciated.

Thanks,

Ian
Re: Back to a more basic question [message #443382 is a reply to message #443378] Fri, 27 January 2006 14:35 Go to previous messageGo to next message
Eclipse UserFriend
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 [message #443387 is a reply to message #443382] Fri, 27 January 2006 15:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dorian.birsan.net

"Ian Leslie" <lesliesoftware@yahoo.com> wrote in message
news:029f8e2de0b1561f9bbf986b429c3a54$1@www.eclipse.org...

[...deleted...]

> 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?

Use a feature patch instead of a feature update. That way you can patch any
nested feature without having to update the root feature.

>
> Thanks,
>
> Ian
>
Re: Back to a more basic question (was Re: Update not working for my RCP app) [message #443390 is a reply to message #443374] Fri, 27 January 2006 15:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dorian.birsan.net

"Ian Leslie" <lesliesoftware@yahoo.com> wrote in message
news:45a02a28a8369a0c1d47936adc927131$1@www.eclipse.org...
> dorian birsan wrote:
> > 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).
>
> Thanks for the clarification. What you describe is not working for me.
> The update url for my root feature is
> http://www3.sympatico.ca/laraian/WizardsFamiliarUpdateSite/ and that site
> has an update for com.lesliesoftware.wizardsfamiliar.database_feature to
> version 2.0.100. The installed version in my test is 2.0.0 and it is one
> of the included features for my root feature.
>
> Any ideas why that would not be working? I see not errors in the log (or
> the console when I run with the console turned on) and the update action
> results in a dialog that says there were no updates found.
>

Create a patch for your database_feature instead of an update.

> Any help or advice would be appriciated.
>
> Thanks,
>
> Ian
>
>
Re: Back to a more basic question [message #443644 is a reply to message #443351] Thu, 02 February 2006 06:11 Go to previous messageGo to next message
Eclipse UserFriend
dorian birsan wrote:

> You can install just the patch of a nested feature, without having to update
> the root feature(s).

That actually did not work - switching the update site to indicate that
the feature was a patch had no effect:

The code I have to find updates (as per the RCP book) still does not find
anything.

The code I have to find extensions (also from the RCP book) finds the
update but does not replace the existing feature properly (as described in
this post earlier in this thread:
http://www.eclipse.org/newsportal/article.php?id=10487&g roup=eclipse.platform.rcp#10487).

I have several questions about all this:
What is the "patch" attribute's purpose? After all increasing the third
or fourth number in the version string should indicate a change that
should be considered patch (e.g. going from 2.0.0 -> 2.0.1 or 10.2.1.0 to
10.2.1.1). While increasing the first or second number should indicate a
change bigger than a patch.

Why is creating an update site with an update that has an update for one
contained feature not working? Is this a bug?

Why, when bringing down a feature from the update site, would it not place
the updated feature at the same place as the existing feature? It seems
like a bad thing to have two versions of the same feature at different
levels in the feature tree. Is this a bug?

I know the update functionality is new to eclipse and is a work in
progress. Where can I read about the plans for its implementation? Are
improvements planned to be made in 3.2? If so I would gladly try them out.

I would really like to know if the behaviour I am seeing is due to my miss
understanding the way update works and should be supported or if what I
have experienced are bugs.

Thanks for all your help everyone,

Ian
Re: Update not working for my RCP app [message #443680 is a reply to message #443162] Thu, 02 February 2006 23:57 Go to previous messageGo to next message
Eclipse UserFriend
Try changing the update url to:
url=file:/P:/WizardsFamiliarUpdateSite/
And fill the blank "Copyright notice" and "License Agreement" in the
feature.xml

Please refer to the Tips of the Article
http://eclipse.org/articles/Article-Update/keeping-up-to-dat e.html

Danny
Re: Back to a more basic question [message #443783 is a reply to message #443644] Fri, 03 February 2006 18:02 Go to previous messageGo to next message
Eclipse UserFriend
Ian Leslie wrote:
> dorian birsan wrote:
>
>> You can install just the patch of a nested feature, without having to
>> update
>> the root feature(s).
>
> That actually did not work - switching the update site to indicate that
> the feature was a patch had no effect:

The feature has to be a patch feature as well.

>
> The code I have to find updates (as per the RCP book) still does not
> find anything.
>
> The code I have to find extensions (also from the RCP book) finds the
> update but does not replace the existing feature properly (as described
> in this post earlier in this thread:
> http://www.eclipse.org/newsportal/article.php?id=10487&g roup=eclipse.platform.rcp#10487).
>
>
A feature patch does not replace a feature. It is a separate feature
that patches another feature. So for example. Say i have a feature
a.b.c_1.0.0. If I want to patch that feature i use a feature patch say
a.b.c.patch1_1.0.0. The patch is a different feature that references
in its import list the feature that it patches
<feature id="a.b.c.patch1" version="1.0.0">
<requires>
<import feature="a.b.c" version="1.0.0" patch="true"/>
</requires>
</feature>

> I have several questions about all this:
> What is the "patch" attribute's purpose? After all increasing the third
> or fourth number in the version string should indicate a change that
> should be considered patch (e.g. going from 2.0.0 -> 2.0.1 or 10.2.1.0
> to 10.2.1.1). While increasing the first or second number should
> indicate a change bigger than a patch.
>
You can have multiple patches attached to the same feature or fixes
applied in parallel. Patches require the referenced feature and plugins
to already be installed as well. If you increase the version number
that is an update which are fixes applied serially.



> Why is creating an update site with an update that has an update for one
> contained feature not working? Is this a bug?
>

When you create the hierarchy you are implying ownership of the
updates to the features below the root. There are options you can turn
on and off to adjust how that behaves I believe if they are still
implemented

> Why, when bringing down a feature from the update site, would it not
> place the updated feature at the same place as the existing feature? It
> seems like a bad thing to have two versions of the same feature at
> different levels in the feature tree. Is this a bug?
>
> I know the update functionality is new to eclipse and is a work in
> progress. Where can I read about the plans for its implementation? Are
> improvements planned to be made in 3.2? If so I would gladly try them out.
>
> I would really like to know if the behaviour I am seeing is due to my
> miss understanding the way update works and should be supported or if
> what I have experienced are bugs.
>
> Thanks for all your help everyone,
>
> Ian
>

Peter
Re: Back to a more basic question [message #443784 is a reply to message #443783] Fri, 03 February 2006 23:21 Go to previous messageGo to next message
Eclipse UserFriend
Peter Manahan wrote:

<snip>
>> The code I have to find extensions (also from the RCP book) finds the
>> update but does not replace the existing feature properly (as described
>> in this post earlier in this thread:
>>
http://www.eclipse.org/newsportal/article.php?id=10487&g roup=eclipse.platform.rcp#10487).
>>
>>
> A feature patch does not replace a feature. It is a separate feature
> that patches another feature. So for example. Say i have a feature
> a.b.c_1.0.0. If I want to patch that feature i use a feature patch say
> a.b.c.patch1_1.0.0. The patch is a different feature that references
> in its import list the feature that it patches
> <feature id="a.b.c.patch1" version="1.0.0">
> <requires>
> <import feature="a.b.c" version="1.0.0" patch="true"/>
> </requires>
> </feature>
<snip>

From what you are saying I really do not want a patch then. I actually
want to update one of my features with a newer version. Is that supposed
to work? Am I supposed to be able to udpate a nested feature of and RCP
application?

Ian
Re: Back to a more basic question [message #443850 is a reply to message #443784] Sat, 04 February 2006 22:05 Go to previous messageGo to next message
Eclipse UserFriend
Ian Leslie wrote:
<snip>
> From what you are saying I really do not want a patch then. I actually
> want to update one of my features with a newer version. Is that
> supposed to work? Am I supposed to be able to udpate a nested feature
> of and RCP application?
>
> Ian
>

Features use a perfect match when including another feature. So you
can't update a nested feature unless you update all the features up the
root from the nested feature you want to up.

What is preventing you from using a patch? The only thing a patch can't
do is remove a plugin.

If you want to update a nested feature without shipping the features up
to the root you must use a patch feature.

Peter
Re: Back to a more basic question [message #443999 is a reply to message #443850] Tue, 07 February 2006 16:30 Go to previous messageGo to next message
Eclipse UserFriend
Peter Manahan wrote:

> Ian Leslie wrote:
> <snip>
>> From what you are saying I really do not want a patch then. I actually
>> want to update one of my features with a newer version. Is that
>> supposed to work? Am I supposed to be able to udpate a nested feature
>> of and RCP application?
<snip>
> Features use a perfect match when including another feature. So you
> can't update a nested feature unless you update all the features up the
> root from the nested feature you want to up.

> What is preventing you from using a patch? The only thing a patch can't
> do is remove a plugin.
In this case I have a nested feature that I will need to update multiple
times per year - faster than the rest of the product. This feature
contains a database so the patch feature is not really suitable since I do
want to be able to remove the older versions (there is no need to have
multiple copies of a 2Mb database when only the newest should be used).

> 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?

Thanks,

Ian
Re: Back to a more basic question - SOLVED [message #444100 is a reply to message #443999] Thu, 09 February 2006 11:09 Go to previous message
Eclipse UserFriend
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
Previous Topic:Create Rich Client Application from an existing plug in
Next Topic:Problems with exporting RCP application
Goto Forum:
  


Current Time: Sun Sep 21 19:55:37 EDT 2025

Powered by FUDForum. Page generated in 0.07786 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top