Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322452 - examples.rcp.sdkui does not work
Summary: examples.rcp.sdkui does not work
Status: RESOLVED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-11 20:26 EDT by Michael Scharf CLA
Modified: 2020-02-19 05:27 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Scharf CLA 2010-08-11 20:26:15 EDT
I tried to run the example:

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/?root=RT_Project

When I want to update the the app I get the  message:

"Cannot complete the request.  This installation has not been configured properly for Software Updates.  See the error log for details"
Comment 1 Michael Scharf CLA 2010-08-11 20:29:41 EDT
the log file contains the message:

!ENTRY org.eclipse.equinox.p2.ui.sdk 2 0 2010-08-12 02:27:35.746
!MESSAGE Could not locate the running profile instance. The eclipse.p2.data.area and eclipse.p2.profile properties may not be set correctly in this application's config.ini file.
Comment 2 Ian Bull CLA 2010-08-12 16:45:16 EDT
How did you 'run' or 'build' the example?  Not configured for updates is something you need to do at build time.
Comment 3 Michael Scharf CLA 2010-08-12 18:05:48 EDT
- I checked out the project
- open the sdkui.product file
- executed "launch an eclipse application" on the front page
Comment 4 Ian Bull CLA 2010-08-12 18:10:44 EDT
After this, go to the launch configuration and look under the tab "Configuration".  There should be a checky box "Support software installation into the launched application".  Try enabling this.

This problem is not really a problem with the examples, but rather PDE launching. If you 'export' the example (and select generate metadata repository) it should work.
Comment 5 Michael Scharf CLA 2010-08-12 18:29:24 EDT
(In reply to comment #4)
> After this, go to the launch configuration and look under the tab
> "Configuration".  There should be a checky box "Support software installation
> into the launched application".  Try enabling this.


I cannot find this check box!
Do you know what the effect would be, so I can do it by hand?
Comment 6 Ian Bull CLA 2010-08-12 18:33:21 EDT
(In reply to comment #5)
> I cannot find this check box!
> Do you know what the effect would be, so I can do it by hand?
It would be setting up an entire p2 profile :-), not really something you want to do by hand.

It's in the launch configuration dialog (Run Configurations.... Eclipse Application, Configuration tab).  Not the product editor. Sorry, that probably wasn't clear.

Also, it was only added in Eclipse 3.6.
Comment 7 Michael Scharf CLA 2010-08-12 18:41:44 EDT
> It would be setting up an entire p2 profile :-), 
> not really something you want to do by hand.

Ok, so what do I have to do to get the update manager working in my product?

Is there something I can copy?

That is what I thought that the sdkui example would provide: something i could use as a template for my own product to get the update manager running.....

Checking the flag in the launch configuration did hot help for my launch...
Comment 8 Ian Bull CLA 2010-08-12 18:52:56 EDT
So, unless I'm missing something, it should be 'working' in your product.  It's just not working when you hit launch.  For updates to work, there has to be a p2/ directory (and some other things). The checky box should set that up, but there could be problems.

So, try this instead.  Export Product -> Select "Generate Metadata Repository". Then try to run the 'exported' product. If this works, then the only problem we have is with PDE launching. If this doesn't work, then we have a problem with our examples (or some other problem).

HTH
Ian
Comment 9 Michael Scharf CLA 2010-08-12 19:09:45 EDT
I cannot get it to work. It seems the product file is set up for macos.

I am not so much interested that example. All I want is to figure out how I can make my product to have an update mechanism.

For that, it would be helpful to understand the steps required starting with something as simple as the rcp mail example (and this is exactly what the sdkui seems to be)
Comment 10 Ian Bull CLA 2010-08-12 19:46:32 EDT
I'm heading off-line for a bit  (and it looks really late for you).  Why don't we connect on IRC and I can help you out.  This should be really easy to get working.
Comment 11 Michael Scharf CLA 2010-08-14 00:16:38 EDT
I think I figured out how to work around my problems (absolutely not understanding why that works):

1. always "Generate metadata repository"
2. go into the p2\org.eclipse.equinox.p2.core\cache\binary
   directory of the generated product and delete the big file
3. if there is a jre in the product and you don't want it, delete it

There seems to be some influence between different products. I have two products in my workspace: my product and the sdkui.product. I have set my product to include the jre. If I export the sdkui.product it also contains the jre.

The entire process of product creation seems *very* fragile especially because there seems to be a cache somewhere that is shared between products.

If I create a new workspace and only check out the examples.rcp.sdkui project and create a product, the cache/binary is 18k. Wen I do the same in my workspace it is 54Mb.
Comment 12 Michael Scharf CLA 2010-08-14 09:52:14 EDT
well, it is a bit more tricky to get a functional update manager in my product:

1. put the examples.rcp.sdkui into the same workspace as my product
2. export sdkui
3. export my product into the same directory
4. go into the p2\org.eclipse.equinox.p2.core\cache\binary
   directory of the generated product and delete the big file

The exports have to be done with ""Generate metadata repository" checked.

If I don't have the sdkui  in my workspace and export it before I export my product I get the message from comment #0

If I compare the product files and the plugins, I do not see any significant difference between my application and the sdkui. Both are essentially variations of the rcpmail example.

What I have not tried yet, it to create a brand new workspace with my product and all its plugins.....
Comment 13 Eclipse Webmaster CLA 2019-09-06 15:32:19 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 14 Ed Merks CLA 2020-02-19 05:27:42 EST
This issue is very stale.  I assume it's no longer relevant.