How to fix an Eclipse Workspace that does not open any more?

It can happen to everyone using Eclipse: launching Eclipse with workspace, and then it is stuck loading it. As a last resort, create a new workspace and go on? Possible, but painful, right? For some time I have a strange issue nagging me: from time to time, I’m not able to switch to a workspace which worked before. The IDE starts loading, but then is stuck:

Eclipse Oxygen Stuck Loading Workspace

Eclipse Oxygen Stuck Loading Workspace

The problem happens to me for multiple versions of Eclipse, including Oxygen (4.7). What I have found out is that it is because of some views open in the workspace, and they somehow might block the Eclipse startup. For example the Processor Expert ‘Component Repository’ view can cause this in Eclipse Neon (4.6) or Oxygen (4.7).

Components Library View in Eclipse

Components Library View in Eclipse

So the usual workaround was to open that workspace with another instance of Eclipse (not having that view), closing that view in the Eclipse Perspective and then I was able to load that workspace again.

Knowing that this has something to do with the perspectives and views, and thanks to a tip (thank you, Livio!), I finally have found the solution to unblock such a workspace :-).

Inside the workspace .metadata folder, there is a file named workbench.xmi:

.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi.

This file stores the perspective window arrangements. So after deleting that file, the IDE windows are reset and I’m now able to load that workspace again :-).

I hope this tip is useful for everyone having such an occasional problem.

Happy Reloading 🙂

Advertisements

4 thoughts on “How to fix an Eclipse Workspace that does not open any more?

  1. Hi Erich,
    It just happened to me again today.
    I switched from my laptop back to my desktop – and the workspace is kept in sync because they are both in dropbox.

    So I open KDS on my desktop and it shows no projects in my workspace – there should have been about 6. Tried deleting the file you mentioned, but that isn’t the problem.

    I tried to start a new workspace and import my existing project, which looks promising, but then I have a problem with getting the debugger up and running – segger seems to give a limited time to enter the processor type (and you have to search thousands). Still seems like I gave it the right one and it doesn’t want to work.

    This happens to me every couple of months…

    Like

    • Hi Brynn,
      sharing a workspace between different machines is a very, very, very bad idea. I cannot tell how bad this is (beside of DropBox a bad thing too).
      The thing is that the .metadata is specific to your machine, and cannot be shared between machines. Bad things will happen (like the one you describe).
      You can share the projects, but never the .metadata in it.
      I hope this helps,
      Erich

      Like

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s