Skip to main content



      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 07:13
Eclipse UserFriend
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.

Hi,

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
				.getService(IProfileRegistry.SERVICE_NAME);
		if (registry == null)
			return;
		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 04:22] by 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: Mon Jul 07 01:42:47 EDT 2025

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

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

Back to the top