[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Re: Encountered several problems with self-provisioning RCP application

Profiles are held in a profile registry. A profile registry can contain several profiles potentially representing completely different instances of eclipse (1). The list of profiles in a registry can be obtained from the IProfileRegistry.getProfiles(). When an instance of eclipse runs, it has access to a profile registry, however it needs to be told who it is (its profile ID) and set itself as the default profile (aka self profile). The communication of its identity to an eclipse instance is done through the eclipse.p2.profile property (see config.ini).
Profiles result from a p2 installation, they are the p2 representation of what makes your application (see http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_director.html)

If you are launching your app from within your IDE, the fact that you don't have a profile (or this profile is not filled) is a known tooling issue (not a trivial one) and it may be addressed in 3.5.
If you are seeing this pb while running your app once deployed, it is because the application you are running has *not* been installed using p2 and therefore you don't have a corresponding profile.



Inactive hide details for "Frank Du" ---20/11/2008 04:21:53 PM---Well, I went back to a previous reply by Susan at http://dev.e"Frank Du" ---20/11/2008 04:21:53 PM---Well, I went back to a previous reply by Susan at http://dev.eclipse.org/mhonarc/lists/p2-dev/msg004


"Frank Du" <du.qixing@xxxxxxxxx>


"P2 developer discussions" <p2-dev@xxxxxxxxxxx>


20/11/2008 04:21 PM


[p2-dev] Re: Encountered several problems with self-provisioning RCP application

Well, I went back to a previous reply by Susan at http://dev.eclipse.org/mhonarc/lists/p2-dev/msg00447.html. After carefully review it, I imported org.eclipse.equinox.p2.ui.sdk as Source Project, and added it to launcher. Then debug the code, and found that the error message is caused by a null profile Id at:

class: org.eclipse.equinox.internal.p2.ui.sdk.UpdateHandler
method: execute
line: profileId = ProvSDKUIActivator.getSelfProfileId();

The variable profileId is null. So I fake one 'p2-maildemo-profile', lol...

Now the "Software Updates and Add-ons" dialog can show up. However, the Installed Software list is empty. I added the local repository. Tried to do the update. Another error message appeared, claiming: Profile id p2-maildemo-profile is not registered. The complaint is fair enough, since I faked it.

Now my question changes to: Where could I find all the registered profile ids? Or how could I register one for my RCP application? Thanks so much in adavance!

Best Regards,
Frank Du

On Wed, Nov 19, 2008 at 10:25 PM, Frank Du <du.qixing@xxxxxxxxx> wrote:

Best Regards,
Frank Du
p2-dev mailing list

GIF image

GIF image