14

When I try to start Eclipse Luna in CentOS 7, I get the following dialog box:

How can I resolve this and get eclipse to start?

Cœur
  • 37,241
  • 25
  • 195
  • 267
CodeMed
  • 9,527
  • 70
  • 212
  • 364
  • Before deleting your Eclipse workspace `.metadata`, try building the Maven projects from the command line - it could be a problem in your `pom.xml` files. – Thomas Taylor Mar 08 '21 at 22:29

3 Answers3

54

Instead of deleting the whole .metadata folder, just delete the file .metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi" You need to make sure to quit eclipse first, then remove this file and start eclipse again.

Error will be gone.

Amanpreet Kaur
  • 1,074
  • 8
  • 7
  • 1
    Thank you and +1 for giving people a different approach to try. – CodeMed Feb 08 '16 at 20:09
  • 2
    awesome solution saved my settings of eclipse as well :) +1 – Ankur Verma Feb 11 '16 at 15:00
  • 1
    +1 That worked for me. However, in my case eclipse froze in background after this error. I had to open the task manager, kill the process, go to .metadata, remove the .lock file before restarting eclipse. – Florian F Jun 16 '16 at 17:00
  • Thank you, it works. In my case it also leads me to a new error : "workspace is in use or cannot be created" that you can solve using [this](http://stackoverflow.com/questions/8489322/eclipse-says-workspace-in-use-or-cannot-be-created-chose-a-different-one-ho) – qatz Jul 15 '16 at 07:58
  • Over a year after this was posted it helped me too. I did lose some layout settings, but those are much easier things to fix than not being able to even start eclipse. – Panda_Claus Jun 08 '17 at 16:37
  • weird (because it seems that helps everyone), but it didn't work in my case. I ended up deleting whole .metadata – Line Jan 31 '18 at 19:59
  • Eclipse gave me a StackOverflowException instead of NullPointerException. This answer does not resolve the problem. – Nathan Dec 16 '20 at 18:22
9

I removed .metada from workspace and reimported the maven projects as quick and dirty solution. You loose your Eclipse settings, you can try to play with metadata.

Adam Hasík
  • 114
  • 1
  • I cannot confirm your answer because this is an old post and I have moved on to other things. But thank you and +1 for replying to this old post. – CodeMed Jul 13 '15 at 19:40
  • Don't blow await all your workspace config. Use instead this answer a similar question: https://stackoverflow.com/a/13545818/4662899 – Kbii Jul 19 '17 at 08:14
  • Eclipse gave me a StackOverflowException instead of NullPointerException. This answer does not resolve the problem. – Nathan Dec 16 '20 at 18:26
  • @Nathan StackOverflowException could be caused by a circular reference in your `pom.xml` files. Try building the projects on the command line (`mvn clean compile`). – Thomas Taylor Mar 08 '21 at 22:30
  • @ThomasTaylor I highly doubt it was due to a circular reference in my `pom.xml`. But, since it is no longer a problem I can't try out your idea. I do not remember what I did to solve the problem. I probably continued with more Google searches and eventually something worked. – Nathan Mar 09 '21 at 01:58
3

For me it was enough just to remove the whole <persistedState /> tag in

<workspace folder>/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
kejn
  • 112
  • 6
  • I started to go down this road because it seemed maybe I would save more of my settings by doing this. However I had over 50 persistedState tags and it just wasn't worth sorting all that out. I ended up using the recommendation by @Amanpreet-Kaur instead. – Panda_Claus Jun 08 '17 at 16:39
  • Eclipse gave me a StackOverflowException instead of NullPointerException. This answer does not resolve the problem. – Nathan Dec 16 '20 at 18:20