Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Cannot query _SELF_ profile [SOLVED](SimpleProfileRegistry cannot locate profiles)
Cannot query _SELF_ profile [SOLVED] [message #1403552] Thu, 24 July 2014 11:13
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 138
Registered: March 2010
Senior Member
SOLUTION: the problem was that when launching from within the IDE one must go to the Configuration tab of the launch configuration and check the "Support software installation in the launched application" button.


I need some help using the P2 services API to inspect the running configuration at runtime. I am trying to query the active profile with this code (from a stack overflow post):

		ProvisioningUI provisioningUI = ProvisioningUI.getDefaultUI();
		String profileId = provisioningUI.getProfileId();
		ProvisioningSession provisioningSession = provisioningUI.getSession();
		IProvisioningAgent agent = provisioningSession.getProvisioningAgent();
		IProfileRegistry registry = (IProfileRegistry) agent
		if (registry == null)
		IQueryable<IInstallableUnit> queryable = registry.getProfile(profileId);

At runtime, the profileId value returned by the provisioning UI is _SELF_. When the last line effectively calls registry.getProfile("_SELF_") I a null value is returned.

Is "_SELF_" a valid profile id? Why can't I list access it?

[Updated on: Fri, 25 July 2014 08:22]

Report message to a moderator

Previous Topic:How to set bundleStartLevel in pom.xml when using eclipse-run Tycho eclipserun plugin
Next Topic:JNDI lookup from OSGI equinox bundle deployed on tomcat (bridged mode)
Goto Forum:

Current Time: Tue Oct 26 22:37:17 GMT 2021

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

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

Back to the top