Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 389488

Summary: JDT update totally destroys your Eclipse installation.
Product: [Eclipse Project] JDT Reporter: Redsandro <redsandro>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: stephan.herrmann
Version: 4.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug
Attachments:
Description Flags
Eclipse error log
none
2013 error log none

Description Redsandro CLA 2012-09-13 06:10:04 EDT
Today I installed updates. After restarting Eclipse, my project opened totally broken. A quick overview taught me that any installed plugins or customizations had been completely ignored. It's as if ~/.eclipse/ doesn't even exist.

Luckily, I had a 2-month-old backup of my home including ~/.eclipse/ and I could retry installing all updates one by one.

Turns out THIS is the update that somehow breaks EVERYTHING ELSE too:
Eclipse Java Development Tools	3.7.2.v20120120-1414-7z8gFcuFMP7BW5XTz0jLTnz0l9B1

I have selected JDT Core to report this bug in, I'm not sure it's correct.
But JDT is the cause, and the fact that it breaks everything else seems pretty core'y to me.

In my particular case, I was working on a Javascript Project, and all the open editor-windows said: 
"Could not open the editor: No editor descriptor for id org.eclipse.wst.jsdt.ui.CompilationUnitEditor"

Also, all plugin-icons were gone from the about-window.

Just in case it's relevant, these are the plugins I have installed to make this scenario possible:

(incoming bulk of text alert)

  Android DDMS	20.0.3.v201208082019-427395	com.android.ide.eclipse.ddms.feature.group	The Android Open Source Project
  Android Development Tools	20.0.3.v201208082019-427395	com.android.ide.eclipse.adt.feature.group	The Android Open Source Project
  Android Hierarchy Viewer	20.0.3.v201208082019-427395	com.android.ide.eclipse.hierarchyviewer.feature.group	The Android Open Source Project
  Android Native Development Tools	20.0.3.v201208082019-427395	com.android.ide.eclipse.ndk.feature.group	The Android Open Source Project
  Android Traceview	20.0.3.v201208082019-427395	com.android.ide.eclipse.traceview.feature.group	The Android Open Source Project
  ChromeDevTools SDK WIP Backends	0.1.8.201207090606	org.chromium.sdk.wipbackends.feature.group	The Chromium Authors
  Chromium JavaScript Debugger Bridge to JSDT	0.3.6.201207090605	org.chromium.debug.jsdtbridge.feature.group	The Chromium Authors
  Chromium JavaScript Remote Debugger	0.3.6.201207090605	org.chromium.debug.feature.group	The Chromium Authors
  Eclipse CVS Client	1.3.100.dist-7B78FHl9exZ_	org.eclipse.cvs.feature.group	Eclipse.org
  Eclipse CVS Client Resources	1.3.100.v20110520-0800-7B78FHl9VF7BD7KBM4GP9C	org.eclipse.cvs.source.feature.group	Eclipse.org
  Eclipse Help Developer Resources	1.3.0.v20110530-0844-7i7uFFmFFl8nvqbDpEqTvx	org.eclipse.help.source.feature.group	Eclipse.org
  Eclipse Java Development Tools	3.7.2.dist-7z8gFcuFFZOlyA8Br73543A7B15B	org.eclipse.jdt.feature.group	Eclipse.org
  Eclipse Java Web Developer Tools	3.3.2.v201112072049-7F7AFO7C25ToiIbpoiuW12GT78Mciy6W7iwuxaco	org.eclipse.jst.web_ui.feature.feature.group	Eclipse Web Tools Platform
  Eclipse PDE Plug-in Developer Resources	3.7.2.v20120120-1420-7b7rFUOFEx2Xnqafnpz0E--0	org.eclipse.pde.source.feature.group	Eclipse.org
  Eclipse Platform	3.7.0.I20110613-1736	org.eclipse.platform.ide	null
  Eclipse Plug-in Development Environment	3.7.2.dist-7b7rFUPF9fnFH	org.eclipse.pde.feature.group	Eclipse.org
  Eclipse Web Developer Tools	3.3.2.v201111030500-7O7IFj6EMjB7yO1Xs_G1kMtQeOye6HTXFWve95_R	org.eclipse.wst.web_ui.feature.feature.group	Eclipse Web Tools Platform
  Eclipse XML Editors and Tools	3.3.2.v201112072049-7H7EFZ7DxumTmce4khcSkIiqoD8eDMKlT8Oz011P	org.eclipse.wst.xml_ui.feature.feature.group	Eclipse Web Tools Platform
  Eclipse XSL Developer Tools	1.3.1.v201109012200-7T7YFRTFIqUoIrvbEtBlSIJXGZNg	org.eclipse.wst.xsl.feature.feature.group	Eclipse Web Tools Platform
  Equinox p2 RCP Management Facilities Source	1.0.1.dist-782EqAUkcWGYdGMiW9DK982713B5	org.eclipse.equinox.p2.rcp.feature.source.feature.group	Eclipse.org - Equinox
  JavaScript Development Tools	1.3.2.v201201112313-7G78FZvFC7sRekSz-g-nAlz	org.eclipse.wst.jsdt.feature.feature.group	Eclipse Web Tools Platform
  PHP Development Tools (PDT) SDK Feature	3.0.0.v201201110400-77-184_2BEICRgM_fMVcz0M4Va9O	org.eclipse.php.sdk.feature.group	Eclipse.org
  Spket IDE	1.6.23	com.spket.ui.feature.group	spket.com
  Spket Text Editor	1.6.23	com.spket.sted.feature.group	spket.com
  Tracer for OpenGL ES	20.0.0.v201206242043-391819	com.android.ide.eclipse.gldebugger.feature.group	The Android Open Source Project
  Web Page Editor	2.3.6.v201201181342-46AB9oB5885D6R5D86	org.eclipse.jst.webpageeditor.feature.feature.group	Eclipse.org
  Xerces for Spket IDE	2.8.0	com.spket.xml.external.feature.group	spket.com
Comment 1 Stephan Herrmann CLA 2012-09-13 16:56:18 EDT
Disclaimer: most of my own experiments with an eclipse installed as admin and installed software going into ~/.eclipse ended in some kind of trouble. I will always recommend to install Eclipse as a regular user so updates go directly into the install.

That said, we should still try to find out what exactly went awry in your case.

Are those 3.7.2 versions what you previously had (before the update) or the result of the update?

If installing JDT broke the system, which exact plugin versions where involved (plugins/org.eclipse.jdt.*)?

Versions like "3.7.2.dist-7z8gFcuFFZOlyA8Br73543A7B15B" seem broken, the unexpected part is: "dist". Any idea where those come from?

When you launched the broken Eclipse, were any errors logged to <workspace>/.metadata/.log ?
Comment 2 Redsandro CLA 2012-09-14 09:55:56 EDT
Created attachment 221085 [details]
Eclipse error log

Well, Ubuntu and derivatives, a reasonably popular distro branch, works this way when you install Eclipse from the software manager. Eclipse is installed as system app, and any fooling around users do get's stored in their homes.

> Are those 3.7.2 versions what you previously had (before the update) or the 
> result of the update?

The list was copied right before I installed the problematic JDT. I updated half of them one by one first though, the crash also 'works' without updating them first.

> If installing JDT broke the system, which exact plugin versions where involved 
> (plugins/org.eclipse.jdt.*)?

This is interesting, I find nothing with jdt in the name? Not in ~/.eclipse/(..)/plugins/ or /usr/share/eclipse/plugins/.

Oh wait let me try to locate:

$ locate org.eclipse.jdt
/usr/lib/eclipse/dropins/jdt/features/org.eclipse.jdt_3.7.2.dist-7z8gFcuFFZOlyA8Br73543A7B15B
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.apt.core_3.3.500.dist.jar
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.apt.pluggable.core_1.0.400.dist.jar
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.apt.ui_3.3.300.dist.jar
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.compiler.apt_1.0.400.dist.jar
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.compiler.tool_1.0.100.dist.jar
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.core.manipulation_1.4.0.dist.jar
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.debug.ui_3.6.1.dist.jar
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.debug_3.7.1.dist
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.doc.user_3.7.1.dist.jar
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.junit.core_3.7.0.dist.jar
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.junit.runtime_3.4.300.dist.jar
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.junit4.runtime_1.1.200.dist.jar
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.junit_3.7.0.dist.jar
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.launching_3.6.1.dist.jar
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.ui_3.7.2.dist.jar
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt_3.7.2.dist.jar
/usr/lib/eclipse/dropins/jdt/plugins/org.eclipse.jdt.debug_3.7.1.dist
/usr/lib/eclipse/dropins/sdk/features/org.eclipse.jdt.source_3.7.2.dist-7z8gFcuFFZOlyA8Br73543A7B15B
/usr/lib/eclipse/plugins/org.eclipse.jdt.core_3.7.3.dist.jar
/usr/share/eclipse/dropins/jdt/features/org.eclipse.jdt_3.7.2.dist-7z8gFcuFFZOlyA8Br73543A7B15B
/usr/share/eclipse/dropins/sdk/features/org.eclipse.jdt.source_3.7.2.dist-7z8gFcuFFZOlyA8Br73543A7B15B


> Versions like "3.7.2.dist-7z8gFcuFFZOlyA8Br73543A7B15B" seem broken, the 
> unexpected part is: "dist". Any idea where those come from?

I don't know if Ubuntu releases a special Eclipse? Nah that's probably irrelevant, the update URL is normal. Here's the full list of update URLs that are enabled:

https://dl-ssl.google.com/android/eclipse/
http://download.eclipse.org/releases/indigo
http://chromedevtools.googlecode.com/svn/update/dev/
http://www.agpad.com/update/ (SPKET, don't really use it anymore)
http://downloads.zend.com/studio-eclipse/updates/9_0

> When you launched the broken Eclipse, were any errors logged to 
> <workspace>/.metadata/.log ?

Let's try it out. First I install:

Eclipse Java Development Tools version 3.7.2.v20120120-1414-7z8gFcuFMP7BW5XTz0jLTnz0l9B1 with ID org.eclipse.jdt.feature.group

Then I close Eclipse, remove .log, open Eclipse, see that nothing works, and see a new .log. I've attached the log. :)
Comment 3 Redsandro CLA 2012-09-14 10:10:32 EDT
The update seems to install org.eclipse.jdt.* in ~/.eclipse/org.eclipse.platform(...)/plugins though. But removing them all doesn't fix Eclipse. The update must be doing something else too.

I'm not entirely sure, but it looks like the update also removed some of the org.eclipse.wst.* files, there used to be more, but maybe that's normal pruning. I don't know.

And it also installed org.junit4_4.8.1.v20100525 and org.hamcrest.core_1.1.0.v20090501071000.jar. (?)

But that's probably irrelevant, most changes after the update are in /configuration/ anyway.

In case of relevance, these are the org.eclipse.jdt.* files present in /plugins/ after the JDT installation:

org.eclipse.jdt.debug_3.7.1.v20111006_r372
org.eclipse.jdt.apt.core_3.3.500.v20110420-1015.jar
org.eclipse.jdt.apt.pluggable.core_1.0.400.v20110305-1450.jar
org.eclipse.jdt.apt.ui_3.3.300.v20110305-1450.jar
org.eclipse.jdt.compiler.apt_1.0.400.v0110816-0800.jar
org.eclipse.jdt.compiler.tool_1.0.100.v_B79_R37x.jar
org.eclipse.jdt.core.manipulation_1.4.0.v20110928-1453.jar
org.eclipse.jdt.core_3.7.3.v20120119-1537.jar
org.eclipse.jdt.debug.ui_3.6.1.v20111006_r372.jar
org.eclipse.jdt.doc.user_3.7.1.r372_v20111103.jar
org.eclipse.jdt.junit.core_3.7.0.v20110928-1453.jar
org.eclipse.jdt.junit.runtime_3.4.300.v20110928-1453.jar
org.eclipse.jdt.junit4.runtime_1.1.200.v20110928-1453.jar
org.eclipse.jdt.junit_3.7.0.v20110928-1453.jar
org.eclipse.jdt.launching_3.6.1.v20111006_r372.jar
org.eclipse.jdt.ui_3.7.2.v20120109-1427.jar
org.eclipse.jdt_3.7.2.v201202080800.jar
Comment 4 Redsandro CLA 2013-11-21 10:32:59 EST
Oh shoot, today I stepped into the exact same pile of poo. I forgot never to update. Eclipse: 3.8.1 in Ubuntu 13.10.

Let me go look for that backup from 2012.
Comment 5 Stephan Herrmann CLA 2013-11-21 13:03:41 EST
Large numbers of users regularly update Eclipse incl. JDT.

However, when you installed Eclipse as an Ubuntu package, they may expect you to use the normal Ubuntu procedure for updating, since one way of updating may confuse the other one.

Personally, I find installing from http://www.eclipse.org/downloads/ much more convenient than what any linux distro can package into their system.
Comment 6 Redsandro CLA 2013-11-21 13:19:12 EST
I see. I thought Ubuntu only installs the main IDE (for all users), and plugins/plugin-updates were always to be installed manually (in home) from within Eclipse.

After all, in-Eclipse updates always worked until that one day in 2012.

I should throw away all that stuff in home and start over. But it's so convenient that my entire workflow just works without figuring out what I am actually using, finding sources, install, re-setup preferences, etc.

I'm gonna have to make a choice.
Comment 7 Redsandro CLA 2013-11-21 14:00:24 EST
You are right. Ubuntu keeps a bunch of plugins in /usr/share/eclipse/plugins.
Any update a user does goes into ~/.eclipse/org.eclipse.platform_3.8_155965261/plugins.

This is usually not a problem, since ~ overrules the share/ plugins, but in this single case it does cause problems.

Whether or not this method is preferable, in my opinion the JDT plugin is supposed to play nice just like everyone else. This breaking behavior should be considered unwanted.

If a car crash gives you injury, you can say "You shouldn't crash" or you can add seat belts.

PS - Similar bug, different version: Eclipse Java Development Tools	3.8.2.v20130116-090414-8-8nFu3FNOfwKLRttdWQJ-2z-_83
Comment 8 Stephan Herrmann CLA 2013-11-21 14:09:50 EST
(In reply to Redsandro   from comment #7)
> Whether or not this method is preferable, in my opinion the JDT plugin is
> supposed to play nice just like everyone else. This breaking behavior should
> be considered unwanted.

We'd be happy to fix a bug, if you say in which way JDT in particular misbehaved. So far all this looks more like a general packaging / installation issue, but feel free to convince us otherwise.
Comment 9 Redsandro CLA 2013-11-21 14:29:38 EST
Created attachment 237629 [details]
2013 error log

New error log
Comment 10 Redsandro CLA 2013-11-21 14:31:09 EST
Well in 2012 I thought the javascript editor was broken, but now I notice it just isn't there anymore after the update. Maybe this means the plugin fails to load entirely? Any editor still open in a previous session will stop with the error mentioned in the initial bugreport. There is also an error log attached to the initial bugreport, and here is a new one (see above).


1) Install latest Ubuntu (13.10)
2) Install latest Eclipse from repo (Version: 3.8.1)
3) Help -> Check for updates
4) Select latest Eclipse Java Development Tools (3.8.2.v20130116-090414-8-8nFu3FNOfwKLRttdWQJ-2z-_83)
5) Update and restart Eclipse when prompted
6) The javascript editor doesn't exist anymore. (Cannot choose it when editing .js files)
7) Any previous sessions where javascript editors were open will fail to load with the message: "Could not open the editor: No editor descriptor for id org.eclipse.wst.jsdt.ui.CompilationUnitEditor"




Details >

org.eclipse.ui.PartInitException: No editor descriptor for id org.eclipse.wst.jsdt.ui.CompilationUnitEditor
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:601)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:271)
	at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1459)
	at org.eclipse.ui.internal.EditorManager$5.runWithException(EditorManager.java:972)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3537)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3189)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
	at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1600)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3537)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3189)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2609)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Comment 11 Eclipse Genie CLA 2020-05-07 13:37:37 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 12 Stephan Herrmann CLA 2020-05-07 15:01:06 EDT
Just to close the loop here:

(In reply to Redsandro   from comment #10)
> Well in 2012 I thought the javascript editor was broken, but now I notice it
> just isn't there anymore after the update. Maybe this means the plugin fails
> to load entirely? Any editor still open in a previous session will stop with
> the error mentioned in the initial bugreport. There is also an error log
> attached to the initial bugreport, and here is a new one (see above).
> 
> 
> 1) Install latest Ubuntu (13.10)
> 2) Install latest Eclipse from repo (Version: 3.8.1)
> 3) Help -> Check for updates
> 4) Select latest Eclipse Java Development Tools
> (3.8.2.v20130116-090414-8-8nFu3FNOfwKLRttdWQJ-2z-_83)
> 5) Update and restart Eclipse when prompted
> 6) The javascript editor doesn't exist anymore. (Cannot choose it when
> editing .js files)
> 7) Any previous sessions where javascript editors were open will fail to
> load with the message: "Could not open the editor: No editor descriptor for
> id org.eclipse.wst.jsdt.ui.CompilationUnitEditor"

Did anybody expect that Eclipse Java Development Tools provides an editor for javascript? :)

Javascript support is provided by (e.g.) org.eclipse.wst.jsdt not org.eclipse.jdt.