Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Status Error while resolving Install Operation
Status Error while resolving Install Operation [message #1730910] Fri, 29 April 2016 17:38 Go to next message
Johannes Michael is currently offline Johannes MichaelFriend
Messages: 2
Registered: April 2016
Junior Member
Hello Eclipse Community,

currently i'm writing an pluginmanager feature for my rcp, which shall support install operations for recently published features from a remote repository with p2.
I encounterd an error while executing the installation.
The content.jar files are found and downloaded into the p2 folders cache, but the status gets this error:

Status ERROR: org.eclipse.equinox.p2.operations code=10053 Operation details null children=[org.eclipse.equinox.internal.provisional.p2.director.PlannerStatus@330d557e]

I debugged the ProfileChangeOperation#resolveModal(IProgressMonitor) method and found out that it won't install because of an error inside the PlannerResolutionJob#runModal(IProgressMonitor) method, where the Provisioning Plan is set. One status says:
Status ERROR: org.eclipse.equinox.p2.director code=0 Software being installed: Feature 1.0.0.201511121558 (org.melanee.appdsl.feature.feature.group 1.0.0.201511121558) null

The other one says:
Status ERROR: org.eclipse.equinox.p2.director code=0 Missing requirement: Feature 1.0.0.201511121558 (org.melanee.appdsl.feature.feature.group 1.0.0.201511121558) requires 'org.eclipse.ui 0.0.0' but it could not be found null

Both are children of a MultiStatus and pass the error to the ProvisioningPlan

What confuses me is this:
"org.eclipse.ui" is part of my product, so could the reason be the version? And if it is because of its version, do i have to change my content.xml file everytime a new version of a plug-in is released?

Some additional info:
I'm running my product in the eclipse IDE.
Here is the installation method:
private static void executeInstallation(Category cat)
			throws ProvisionException, OperationCanceledException, URISyntaxException {

		
		IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(cat.getFeature().get(0).getID() + ".feature.group");
		Collection<IInstallableUnit> toInstall = metadataRepo.query(query, new NullProgressMonitor())
				.toUnmodifiableSet();

		InstallOperation installOperation = new InstallOperation(session, toInstall);
		installOperation.setProfileId(profile.getProfileId());
		
		SubMonitor sub = SubMonitor.convert(new NullProgressMonitor(), "Checking for the applications...", 200);
		IStatus result = installOperation.resolveModal(sub.newChild(100));
		System.out.println(result.toString());
		if (result.isOK()) {
			Job job = installOperation.getProvisioningJob(new NullProgressMonitor());
			job.addJobChangeListener(new JobChangeAdapter() {

				public void done(IJobChangeEvent event) {
					agent.stop();
				}
			});
			job.schedule();
		}
	}


I would be really thankfull, if someone could help me.

Regards

Johnny

[Updated on: Tue, 10 May 2016 14:38]

Report message to a moderator

Status Error while resolving Install Operation [message #1731719 is a reply to message #1730910] Mon, 09 May 2016 14:19 Go to previous message
Johannes Michael is currently offline Johannes MichaelFriend
Messages: 2
Registered: April 2016
Junior Member
Registred Profile is a profile with id = IProvisioningAgent.INSTALLER_PROFILEID = "org.eclipse.equinox.p2.installer.profile.id"

	profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
	session = new ProvisioningSession(agent);
	
			profile = profileRegistry.getProfile(IProvisioningAgent.INSTALLER_PROFILEID);


...
	InstallOperation installOperation = new InstallOperation(session, toInstall);
	installOperation.setProfileId(profile.getProfileId());

[Updated on: Tue, 10 May 2016 14:42]

Report message to a moderator

Previous Topic:IMetadataRepository deleted after update
Next Topic:How to upgrade singleton plugins using p2?
Goto Forum:
  


Current Time: Wed Dec 13 22:54:00 GMT 2017

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

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