85

Last night my machine restarted while Eclipse Galileo was open. No big deal, right?

This morning, I started my machine and tried to open Eclipse. Instead of opening, I see this: alt text

The error log suggests that there is some kind of problem caused by exiting with unsaved changes.

How can I get Eclipse to open and ignore those unsaved changes? I can't even open a text file that is not part of this project with Eclipse? There must be a way to reset this state.

EDIT:

I have tracked down the problem to a single file. When I delete this file below, Eclipse opens but my projects are missing.

.metadata\.plugins\org.eclipse.core.resources\.snap

I do use the subversion plugin, but I don't think that is the problem. Here is what the error log says ( abbreviated ):

!SESSION 2010-08-17 10:13:01.718 -----------------------------------------------
eclipse.buildId=M20100211-1343
java.version=1.4.2_06
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_CA
Command-line arguments:  -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.core.resources 2 10035 2010-08-17 10:13:02.656
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.eclipse.osgi 4 0 2010-08-17 10:13:02.671
!MESSAGE An error occurred while automatically activating bundle org.eclipse.core.resources (33).
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.core.resources.ResourcesPlugin.start() of bundle org.eclipse.core.resources.
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
...

Caused by: org.eclipse.core.internal.dtree.ObjectNotFoundException: Tree element '/reports/src/com/lang/reports/OnlineReport.java' not found.
    at org.eclipse.core.internal.dtree.AbstractDataTree.handleNotFound(AbstractDataTree.java:257)
...

Root exception:
org.eclipse.core.internal.dtree.ObjectNotFoundException: Tree element '/reports/src/com/lang/reports/OnlineReport.java' not found.
    at org.eclipse.core.internal.dtree.AbstractDataTree.handleNotFound(AbstractDataTree.java:257)
...

!ENTRY org.eclipse.osgi 4 0 2010-08-17 10:13:02.703
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: org/eclipse/core/resources/IContainer
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:114)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)

!ENTRY org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.eclipse.jdt.apt.core_3.3.202.R35x_v20091130-2300 [103] was not resolved.
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.eclipse.jdt.apt.pluggable.core_1.0.201.R35x_v20090925-1100 [104] was not resolved.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing required bundle org.eclipse.jdt.apt.core_0.0.0.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.tool_0.0.0.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.apt.dispatch_0.0.0.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.apt.model_0.0.0.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.apt.util_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.eclipse.jdt.apt.ui_3.3.200.v20090930-2100_R35x [105] was not resolved.
!SUBENTRY 2 org.eclipse.jdt.apt.ui 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing required bundle org.eclipse.jdt.apt.core_[3.2.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.eclipse.jdt.compiler.apt_1.0.201.R35x_v20090925-1100 [106] was not resolved.
!SUBENTRY 2 org.eclipse.jdt.compiler.apt 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.tool_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.eclipse.jdt.compiler.tool_1.0.100.v_981_R35x [107] was not resolved.
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.eclipse.jdt.junit4.runtime_1.1.0.v20090513-2000 [116] was not resolved.
!SUBENTRY 2 org.eclipse.jdt.junit4.runtime 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing required bundle org.junit4_[4.4.0,5.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.hamcrest.core_1.1.0.v20090501071000 [184] was not resolved.
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle org.junit4_4.5.0.v20090824 [186] was not resolved.
!SUBENTRY 2 org.junit4 2 0 2010-08-17 10:13:02.765
!MESSAGE Missing required bundle org.hamcrest.core_1.1.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765
!MESSAGE Bundle com.collabnet.subversion.merge_2.1.0 [208] was not resolved.
8
  • 2
    java.vendor=Sun Microsystems Inc. I think this may be the root cause! :)
    – pavanlimo
    Aug 17, 2010 at 17:38
  • try starting eclipse with another workspace and see if this works.
    – theomega
    Aug 17, 2010 at 17:39
  • No can do. Can't open another workspace. Can't open a text file not associated with any project. I'm stuck in limbo.
    – jeph perro
    Aug 17, 2010 at 17:42
  • What exactly is your version(including build-no)?
    – pavanlimo
    Aug 17, 2010 at 17:46
  • eclipse.buildId = M20100211-1343 Release 3.5.2
    – jeph perro
    Aug 17, 2010 at 17:48

14 Answers 14

143

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.

12
  • 2
    Worked without losing projects or tasks :) Eclipse Juno (2013). Thanks!
    – BurninLeo
    Apr 8, 2013 at 9:42
  • 2
    Deleting the .snap or all .snap files recursively didn't fix it for me.
    – jfritz42
    May 17, 2013 at 16:06
  • 1
    i was lost, now i am home :D thanx
    – Shoshi
    Jan 11, 2014 at 13:37
  • 1
    @Krishna: thanks this solution for me but I just dont understand why did it occur in the first place! can u please explain? Mar 24, 2014 at 6:14
  • 2
    This also worked with Eclipse Neon, though .snap was in /.metadata/.plugins/org.eclipse.core.resources/.root Dec 10, 2016 at 20:39
95

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.

10
  • 2
    Thanks, this helped me. I was at least able to restart eclipse after I deleted the .snap file in .metadata. Unfortunately I lost all my projects. In the end I had to re-checkout all my projects from subversion. But at least I am up and working again.
    – jeph perro
    Aug 19, 2010 at 16:27
  • 1
    Got exactly the same here, damn. May 7, 2011 at 6:05
  • 11
    I think the correct answer should be the one below. Above resets your whole workspace, below in the other hand keeps everything you did as it is.
    – retromuz
    Aug 20, 2013 at 5:04
  • 2
    Why was this the accepted answer. Completely borked my install, and I have spent the next few hours fixing it. Aug 11, 2014 at 12:27
  • 1
    Could you please update the answer to explain that it removes all your project setups? If you are in a hurry and not so experienced with Eclipse you get very frustrated when all your configuration is gone. Still your solution solves the problem, but with an undesired effect. So you still get an upvote.
    – muthee
    Apr 20, 2015 at 5:21
15

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.

4
  • 1
    This worked for me. Was a pain to re-create my projects but the other answers didn't help me.
    – jfritz42
    May 17, 2013 at 16:07
  • this worked for me. I re-imported my projects so I didn't have to re-create them. Everything is as before
    – james
    Sep 25, 2016 at 22:41
  • Did not work for me. Had to delete .metadata folder. Nov 15, 2017 at 5:51
  • In my case (Jaspersoft Studio 5.5.1 final) it made all projects disappear from the Project Explorer, except the default one (and I don't know how to open them).
    – Pere
    Feb 3, 2022 at 8:51
5

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).
2

For anyone interested, I had the exact same problem and deleting the file .metadata/.plugins/org.eclipse.core.resources/.snap did the trick for me.

1

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...

1
  • I had to do this too, just deleting .snap didn't fix it. I'm using Luna SR1 (4.4.1). Jan 12, 2015 at 10:04
1

This also works when you receive this error from Information Design Tool (IDT) (Business Objects BI4).

  1. Delete .snap file from this directory.
    Please note that you Will lose all your local projects. Hopefully your modifications have been recently saved to a repository.

Directory - C:\Users\xxxxuser.name.businessobjects\bimodeler_14\workspace.metadata.plugins\org.eclipse.core.resources\

2
  • Deleting (or renaming) the .snap file helped in deed (without losing the whole workspace!!!). Thanks! Feb 10, 2015 at 10:38
  • I found the file here: C:\workspace\.metadata\.plugins\org.eclipse.core.resources\.snap - which is the same path, except the path shown above is missing some backslashes and the workspace is in a different location ... Feb 10, 2015 at 10:45
1

Use the clean option

I had this error. I start eclipse with "clean" option and that worked for me.

eclipse.exe -clean

Eclipse starts and all projects ok.

1
  • Tried this with eclipse neon. Didn't work for me.
    – RayCh
    Apr 1, 2021 at 8:50
0

solution: delete .metadata folder in your last workspace. reason: Maybe you force shutdown/restart your computer, while your eclipse still running.

0

Just a little tip that might help people avoid an issue that I encountered.

In my case there were multiple workspace directories on my machine. When I ran the mvn sonar:sonar goal then it created its own workspace directory, placed the snapshot (.snap files) in there, and changed a setting to tell maven to look there for changes first. However, this was not my workspace that I was using, so the snapshot was never being updated with my changes. So when maven used that snapshot it could not find the files in their old locations. So I had to eliminate that workspace to resolve the issue. This worked because maven then looked in the next workspace on its list, my workspace, for the snapshot instead of the one added (but never updated) by the sonar goal.

So you might need to search your entire hard drive for *.snap files to see if there is more one workspace being used on your machine.

0

Check your environment variables _JAVA_OPTION path. I had HP UFT installed on my system and I set _JAVA_OPTION to IGNOREME_JAVA_OPTION for both system and environment variable. After reboot, eclipse showed the same error " check log file". Removed the IGNOREME and eclipse no issues. This could be another possibility that could be looked at to fix the eclipse.

Hope this helps.

0

I also had the same problem, this happens when you force shutdown/restart your computer, while your eclipse still running. Deleting .metadata folder worked for me. Delete all the metadata and then import your project from that same workspace.

0

Rather deleting whole .metadata folder, which in turns delete your projects from workspace, try to find the .snap files and delete them. .snap files are the snapshot of workspace's temporary instance which will be saved on clean & close of workspace.

0

Delete all the *.Snap files in the path workspace-directory>.metadata.plugins\org.eclipse.core.resources

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.