Hello,
I have a problem with the following scenario:
1. I install a feature using p2 director from command line(works fine)
2. I check for updates in eclipse (GUI), and feature is updated from the corporate update site since there is a newer version (also works fine)
3. I uninstall the feature using p2 director from command line - this fails. (It works correctly when no updating through update site is involved.) The exception I get is as follows:
java.lang.IllegalStateException: Profile PlatformProfile is not current. Expected timestamp 1324376389757 but was 1324376389757.
at org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.lockProfile(SimpleProfileRegistry.java:752)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:65)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:44)
at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:41)
at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:23)
at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.updateRoamingProperties(DirectorApplication.java:1022)
at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.performProvisioningActions(DirectorApplication.java:549)
I tried to debug this, but the problem is that when I call p2 director from the "debug configurations" uninstalling works. This is probably because it has some more parameters given to the p2 director (like -dev -data and especially -configuration which has a path to a newly created configuration folder). The thing I manage to figure out is that when debugging executeMethod of PlanExcecutionHelper
public static IStatus executePlan(IProvisioningPlan result, IEngine engine, IPhaseSet phaseSet, ProvisioningContext context, IProgressMonitor progress) {
if (!result.getStatus().isOK())
return result.getStatus();
if (result.getInstallerPlan() != null) {
IStatus installerPlanStatus = ((IEngine) result.getInstallerPlan().getProfile().getProvisioningAgent().getService(IEngine.SERVICE_NAME)).perform(result.getInstallerPlan(), phaseSet, progress);
if (!installerPlanStatus.isOK())
return installerPlanStatus;
Configurator configChanger = (Configurator) ServiceHelper.getService(DirectorActivator.context, Configurator.class.getName());
try {
configChanger.applyConfiguration();
} catch (IOException e) {
return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Director_error_applying_configuration, e);
}
}
return engine.perform(result, phaseSet, progress);
}
the result.getInstallerPlan() returns null and the if block is not executed. In normal situation (I used print outs) this block is executed and the last line engine.perform(..) fails somewhere inside.
Any ideas? I'm struggling with this second day I feel that I'm running out of ideas...
I'm using Windows XP and Eclipse 3.6.1.
Best Regards,
Marcin
[Updated on: Tue, 20 December 2011 13:04]
Report message to a moderator