Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 225198 - P2 disappears after some plugin installations or problematic SDK update
Summary: P2 disappears after some plugin installations or problematic SDK update
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Pascal Rapicault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 228053 228629 (view as bug list)
Depends on: 224765
Blocks:
  Show dependency tree
 
Reported: 2008-04-01 16:17 EDT by Daniel Le Berre CLA
Modified: 2008-04-24 05:47 EDT (History)
6 users (show)

See Also:


Attachments
Eclipse configuration after p2 disappeared from help menu. (80.46 KB, text/plain)
2008-04-06 18:30 EDT, Joseph Schwarz CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Le Berre CLA 2008-04-01 16:17:44 EDT
Build ID: I20080327-0100

Steps To Reproduce:
1. Installed Eclipse 3.4 I20080327-0100
2. Installed 3 plugins Alloy4Eclipse/Findbugs/Subclipse fine
3. Tried to update Eclipse SDK from P2 testUpdate site
4. Error message saying that Eclipse cannot be updated
5. Stop eclipse.
6. Start Eclipse: In Help/Software Update, the old update manager is now available, P2 has disappeared.



More information:
I think the problem is related to the impossibility to update the SDK I met when trying to update I20080327-0100 to I20080328xxx. I guess that some bundles have been silently uninstalled at that time.
Comment 1 Joseph Schwarz CLA 2008-04-04 18:27:55 EDT
I had the same problem, after using p2 to add the CDT and ECF from the Ganymede milestone site to an Eclipse SDK m6 installation. Combined install wouldn't work, so I installed first the CDT and then (after Eclipse restart) the ECF. At this point, p2 was gone and the old Update Manager was available. There was no option to re-enable p2 under Preferences/General/Capabilities.
Comment 2 John Arthorne CLA 2008-04-06 17:52:19 EDT
Were there any errors in the log when this happened?
Comment 3 Joseph Schwarz CLA 2008-04-06 18:30:44 EDT
Created attachment 95010 [details]
Eclipse configuration after p2 disappeared from help menu.
Comment 4 Joseph Schwarz CLA 2008-04-06 18:31:25 EDT
Not in my case (which I reproduced today). However, I attach the results of selecting Help / About Eclipse SDK / Configuration details, which shows the configuration immediately after I restarted Eclipse to find the old update manager back again.
Comment 5 Joseph Schwarz CLA 2008-04-06 18:55:24 EDT
I saw this problem when I used the Ganymede staging site to install the ECF features. When I repeated the whole procedure from scratch (SDK download & install, CDT install from Ganymede staging site) but installed the ECF from its new site, http://download.eclipse.org/technology/ecf/2.0/3.4/updateSite/site.xml, it worked without problems and p2 remained installed after Eclipse restart.
Comment 6 John Arthorne CLA 2008-04-06 20:03:49 EDT
Ah, if you install a different version of ECF from the four included in the p2 feature, then the p2 feature will be invalidated. Still, I would expect it to refuse to install the incompatible version in the first place, unless someone is using legacy Update Manager.
Comment 7 Pascal Rapicault CLA 2008-04-06 21:26:33 EDT
I have experienced that myself in the past. My belief here is that the p2 UI is optimized out by the resolver since in the current MD there is no strong dependency on the feature.
Comment 8 Pascal Rapicault CLA 2008-04-08 16:35:54 EDT
Marking as fixed since the real pb has been addressed.
Comment 9 Joseph Schwarz CLA 2008-04-09 13:42:01 EDT
(In reply to comment #8)
> Marking as fixed since the real pb has been addressed.
> 

Does this mean that all older, non-P2-compliant update sites, and older plugins, e.g., without feature specifications, will become unusable with a p2-enabled system?
Comment 10 Pascal Rapicault CLA 2008-04-09 13:58:58 EDT
This issue had nothing to do with the ability to connect to old update sites. 
p2 supports connecting to existing update sites, should there be any issue with this it should be fixed.
Comment 11 Daniel Le Berre CLA 2008-04-14 05:22:14 EDT
I confirm that the bug is fixed.

I just downloaded 3.4M6a.

I installed exactly the same plugins (A4E, Subclipse, Findbugs).

I added the testUpdate site.

I updated Eclipse SDK.

The update manager found 20080410-1022 and installed it properly.

P2 is still available after reboot :)

Note that if the right build number shows up at startup on Ganymede splash screen, the build number on the about box is wrong: I20080408-0800

Note also that there is a wrong Eclipse SDK feature on testUpdate: Eclipse SDK SDKI20080408-1636 contains only releng plugin. I guess that testUpdate need to be cleaned.





Comment 12 Joseph Schwarz CLA 2008-04-14 05:43:37 EDT
(In reply to comment #11)
> I confirm that the bug is fixed.
> 
> I just downloaded 3.4M6a.
> 

I have just tried 3.4M6a, and for me, the bug is *not* fixed:

1. I installed 3.4M6a
2. I added the following Ganymede update site:
http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/releases/ganymede/site.xml
3. I installed ECF from this site
4. I restarted Eclipse
5. p2 was gone and the old Update Manager was in its place.
Comment 13 Daniel Le Berre CLA 2008-04-14 07:23:31 EDT
Joseph,

I added your update site to my update manager and installed ECF 20080211-2042

After rebooting, P2 was still there.

Note that I am no longer in 3.4M6a but with IBuild 20080410-1022.

I am using Eclipse/GTK 2 under Linux/Mandriva 2008 Spring/Sun JDK 1.6.0_05. 

Comment 14 Joseph Schwarz CLA 2008-04-14 08:13:19 EDT
(In reply to comment #13)
> Joseph,
> 
> I added your update site to my update manager and installed ECF 20080211-2042
> 
> After rebooting, P2 was still there.
> 
> Note that I am no longer in 3.4M6a but with IBuild 20080410-1022.
> 
> I am using Eclipse/GTK 2 under Linux/Mandriva 2008 Spring/Sun JDK 1.6.0_05. 
> 

I could only install the ECF Framework Application, not the Framework Core on Eclipse I20080410-1022 because some dependencies were not resolvable. On the bright side, however, P2 was still available after restart.

I then tried to use the official ECF update site, http://download.eclipse.org/technology/ecf/2.0/updateSite, to move to a newer version of ECF. This time, p2 reported conflicts with the previous ECF Framework Application installation. When I then tried to uninstall the ECF Framework Application, p2 reported a java.lang.ArrayIndexOutOfBoundsException and the message:

Unexpected error encountered while preparing for the operation.
-1

Should I file a separate bug report for this?

(I'm running RedHat Enterprise Linux 4.4 with JDK 1.6.0_04)
Comment 15 Pascal Rapicault CLA 2008-04-14 10:57:20 EDT
Joseph, please open another bug. Thx.
Comment 16 Daniel Le Berre CLA 2008-04-15 05:26:00 EDT
(In reply to comment #14)

> I then tried to use the official ECF update site,
> http://download.eclipse.org/technology/ecf/2.0/updateSite, to move to a newer
> version of ECF. This time, p2 reported conflicts with the previous ECF
> Framework Application installation. When I then tried to uninstall the ECF
> Framework Application, p2 reported a java.lang.ArrayIndexOutOfBoundsException
> and the message:
> 
> Unexpected error encountered while preparing for the operation.
> -1
> 

I confirm the problem.

Here is the trace:
!ENTRY org.eclipse.equinox.p2.ui 4 0 2008-04-15 11:15:01.639
!MESSAGE Unexpected error encountered while preparing for the operation.
!STACK 0
java.lang.ArrayIndexOutOfBoundsException: -1
	at java.util.ArrayList.set(ArrayList.java:339)
	at org.eclipse.equinox.internal.p2.director.SimplePlanner.sortOperations(SimplePlanner.java:122)
	at org.eclipse.equinox.internal.p2.director.SimplePlanner.generateOperations(SimplePlanner.java:110)
	at org.eclipse.equinox.internal.p2.director.SimplePlanner.generateProvisioningPlan(SimplePlanner.java:48)
	at org.eclipse.equinox.internal.p2.director.SimplePlanner.getProvisioningPlan(SimplePlanner.java:367)
	at org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil.getProvisioningPlan(ProvisioningUtil.java:174)
	at org.eclipse.equinox.internal.provisional.p2.ui.actions.UninstallAction.getProvisioningPlan(UninstallAction.java:82)
	at org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction$1.run(ProfileModificationAction.java:60)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)


Comment 17 Pascal Rapicault CLA 2008-04-15 22:47:44 EDT
The ArrayIndexOutOfBound has been fixed in this week I build.
Comment 18 John Arthorne CLA 2008-04-21 18:11:51 EDT
*** Bug 228053 has been marked as a duplicate of this bug. ***
Comment 19 Robert Elliot CLA 2008-04-21 18:18:57 EDT
I'm not entirely sure whether I've seen the same thing as this, but this evening I:

* Downloaded the 3.4M6a Equinox P2 Installer
* Did a shared install
* Installed the Mylyn & Subversive plugins from the http://download.eclipse.org/releases/ganymede/staging/ update site

And the P2 updater was gone from the help menu, replaced by the old "Software Updates" menu item.
Comment 20 Thomas Hallgren CLA 2008-04-24 05:47:39 EDT
*** Bug 228629 has been marked as a duplicate of this bug. ***