Eclipse won't start, log error says: ObjectNotFoundException: Tree element

Solution 1:

For this issue I had to delete the .snap file located in the directory :

<workspace-directory>\.metadata\.plugins\org.eclipse.core.resources

After deleting that file, I was able to start my Eclipse with no problem.

Solution 2:

Recommended: Delete <workspace-directory>\.metadata\.plugins\org.eclipse.core.resources\.snap. This will not reset your workspace and your other projects won't get deleted (as answered by krishna).

Not Recommended: Alternatively, delete the the whole <workspace-directory>\.metadata directory from your workspace and restart.This will reset your workspace and delete all your existing projects in it.

Solution 3:

Ran into this error.

There was no .snap file in my .metadata folder.

I had to delete this:

<workspace>/.metadata/.plugins/org.eclipse.core.resources/.root/d+.tree

d+=> some number.

Then I had to re-import the projects and re-assign the working sets. I preferred it over opening a new workspace and redoing settings.

Solution 4:

Deleting .snap file worked perfect for me.

  1. Delete .snap file from the directory - workspace.metadata.plugins\org.eclipse.core.resources.
  2. Import the workspace (existing projects into workspace - do not copy folders into workspace again).

Solution 5:

Had similar problem.

Log file said exception was caused by corruption in the project tree -- a very vague description.

Deleting individual files and directories in /.metadata/.plugins/org.eclipse.core.resources didn't work for me. I had to delete the entire /.metadata/.plugins/org.eclipse.core.resources directory. I lost the entire project tree but not the projects. They were still in the workspace and just needed to be imported back into Eclipse. I also did not lose the large numbers of plugins configured for working Java, Android, PHP, C++, J2EE, etc.

This is the second time I encountered a project tree related corruption. The first time I deleted the .metadata altogether and then spent a very long time putting back all the plugins and projects. The direction the other answers here were useful in zeroing in on just the org.eclipse.core.resources directory. Seems deleting the whole directory just results in only needing to reimport all the projects.

Your mileage may vary...