1

My Eclipse workspace doesn't open anymore. Eclipse started to launch , then..nothing. Here is my log :

!ENTRY org.eclipse.egit.ui 2 0 2020-10-26 22:14:42.055
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\xav_m'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
!ENTRY org.eclipse.ui.workbench 4 0 2020-10-26 18:34:52.194
!MESSAGE FrameworkEvent ERROR
!STACK 0
java.lang.NullPointerException
    at org.eclipse.ui.internal.AbstractWorkingSetManager.getUniqueDescriptors(AbstractWorkingSetManager.java:685)
    at org.eclipse.ui.internal.AbstractWorkingSetManager.bundleChanged(AbstractWorkingSetManager.java:632)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:973)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)

I installed GitBash few weeks ago but never used it before, except to config my user name and email address used on my GitHub account. I haven't created a local repository yet. I installed Egit plugin few weeks ago, without used it, and updated it today. Since this update, when I try to launch Eclispe,I have the message above.

I tried to change the variable Home with value "%USERPROFILE%" , just to see, but I had the following message:

!ENTRY org.eclipse.ui.workbench 4 0 2020-10-26 18:29:50.338
!MESSAGE FrameworkEvent ERROR
!STACK 0
java.lang.NullPointerException
    at org.eclipse.ui.internal.AbstractWorkingSetManager.getUniqueDescriptors(AbstractWorkingSetManager.java:685)
    at org.eclipse.ui.internal.AbstractWorkingSetManager.bundleChanged(AbstractWorkingSetManager.java:632)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:973)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)

Means the same message, without the message about git. I created a local repository "git" and init it in my folder user, it didn't work. Should I desinstall GitBash? Or remove the .metadata in my worskpace? Thank you for your help

Tarun
  • 748
  • 1
  • 13
  • 30
Aegit
  • 21
  • 6
  • 1
    Does this answer your question? [How to recover corrupted Eclipse workspace?](https://stackoverflow.com/questions/950476/how-to-recover-corrupted-eclipse-workspace) – Curiosa Globunznik Oct 26 '20 at 22:18
  • **Never ever delete the `.metadata` folder!** That's a hoax spread on Stack Overflow that can cause damage. And no, it's not related to EGit; that's just a warning, not an error. Delete the `.log` file, try to start Eclipse and then add the entire `.log` to your question (do not crop anything and format it as code snippet to prevent line breaks). In most cases it's a too old Eclipse with a newer Java or a newer Java with a too old Eclipse or caused by a plugin you installed. – howlger Oct 27 '20 at 09:30
  • My latest log I've just done is more than 500lines. Do you really want the entire log ? The recents plugins I've installed are DevStyle and an Egit update. Just after that , 2 "grey" files appeared (like hidden files), which corresponds to 2 projects from my GitHub account. Then, I turned off Eclipse and couldn't restart it .But this 2 projects are not in a local repository in my computer, because I haven't created local repository on present computer yet. There are from a local repository from another computer. – Aegit Oct 27 '20 at 14:36
  • That's why I said that you should first delete the `.log` file and then reproduce the issue to get a minimal `.log` file. DevStyle might cause it. Be careful which plugins you install, since they can slow down or even break Eclipse. – howlger Oct 27 '20 at 22:33
  • There are ways to share such a file. All entries containing the string `genuitec` are from the DevStyle plugin. – howlger Oct 28 '20 at 14:08
  • I had got it and and I did as asked, and my minimal .log was around 500 lines. I didn't know what was relevant or not. Anyway, as many lines were around workbench, I tried the following, as I read somewhere: Go to .metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi and remove workbench.xmi. And it worked. I don't know why. Thank you for your help and your advice about plugins. – Aegit Oct 28 '20 at 14:09

2 Answers2

1

Ok, after few research, I tried the following and it worked for me: Go to .metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi and remove workbench.xmi

And Eclipse works now, but of course I don't why. If someone has a little clue, I take it :)

Aegit
  • 21
  • 6
  • This sounds a lot like the DevStyle plugin (`workbench.xmi` is the file in which the layout is persisted); have heard this from others too. – howlger Oct 28 '20 at 14:04
  • You're right, in my log, there are many lines about .genuitec – Aegit Oct 28 '20 at 14:22
0

Don't attempt to recover the workspace. Create a new workspace. If all of your projects are stored in a remote git repository, just reimport the projects from your local repository (although it's not clear whether you've ever cloned a repository). If any of the projects are not stored in git, but in local directories on the local disk, then just reimport from those locations (even if that location is within the original workspace).

David M. Karr
  • 14,317
  • 20
  • 94
  • 199
  • The problem is I cannot start Eclipse. When I launch it, it try to connect to D:\Eclipse-workspace, and then nothing happens. No Eclipse. I still have projects on workspacebut I think I can't access to another workspace if I can't start Eclipse, can I ? I haven't cloned a repository. And I haven't created a local repository on my present computer yet. I just updated Egit, and then 2 projects fon my GitHub account appeared, but there are looked like hidden files.Then, I turned off Eclipse and couldn't reopened it then. This 2 projects were from a local repository created on other computer. – Aegit Oct 27 '20 at 14:49