Monday, October 04, 2004

Worst Eclipse Crash --- Ever

Somehow, after years of flawless service, my Eclipse workspace just self-destructed. Don't know what caused it, it just freaked out while I was switching between projects. My .log file says:

!SESSION Oct 04, 2004 18:44:07.894 ---------------------------------------------
eclipse.buildId=I200406251208
java.version=1.4.1_01
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US

!ENTRY org.eclipse.osgi Oct 04, 2004 18:44:07.894
!MESSAGE An error occured while automatically activating bundle org.eclipse.core.resources (27).
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.core.internal.compatibility.PluginActivator.start() of bun
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:975)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937)
        at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:421)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:293)
        at org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLocalClass(EclipseClassLoader.java:110)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:371)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.requireClass(BundleLoader.java:336)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findRequiredClass(BundleLoader.java:914)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:399)
        at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass(AbstractClassLoader.java:93)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
        at org.eclipse.ui.internal.ide.model.WorkbenchAdapterFactory.(WorkbenchAdapterFactory.java:26)
        at org.eclipse.ui.internal.ide.model.WorkbenchAdapterBuilder.registerAdapters(WorkbenchAdapterBuilder.java:33)
        at org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor.initialize(IDEWorkbenchAdvisor.java:155)
        at org.eclipse.ui.application.WorkbenchAdvisor.internalBasicInitialize(WorkbenchAdvisor.java:165)
        at org.eclipse.ui.internal.Workbench.init(Workbench.java:789)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1325)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
        at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
        at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
        at org.eclipse.core.launcher.Main.run(Main.java:644)
        at org.eclipse.core.launcher.Main.main(Main.java:628)
Caused by: org.eclipse.core.internal.resources.ResourceException: The resource tree is locked for modifications.
        at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:93)
        at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:1628)
        at org.eclipse.core.internal.resources.Workspace.close(Workspace.java:298)
        at org.eclipse.core.resources.ResourcesPlugin.shutdown(ResourcesPlugin.java:324)
        at org.eclipse.core.internal.compatibility.PluginActivator.start(PluginActivator.java:52)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:958)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:954)
        ... 30 more
Root exception:
org.eclipse.core.internal.resources.ResourceException: The resource tree is locked for modifications.
        at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:93)
        at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:1628)
        at org.eclipse.core.internal.resources.Workspace.close(Workspace.java:298)
        at org.eclipse.core.resources.ResourcesPlugin.shutdown(ResourcesPlugin.java:324)
        at org.eclipse.core.internal.compatibility.PluginActivator.start(PluginActivator.java:52)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:958)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:954)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937)
        at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:421)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:293)
        at org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLocalClass(EclipseClassLoader.java:110)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:371)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.requireClass(BundleLoader.java:336)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findRequiredClass(BundleLoader.java:914)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:399)
        at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass(AbstractClassLoader.java:93)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
        at org.eclipse.ui.internal.ide.model.WorkbenchAdapterFactory.(WorkbenchAdapterFactory.java:26)
        at org.eclipse.ui.internal.ide.model.WorkbenchAdapterBuilder.registerAdapters(WorkbenchAdapterBuilder.java:33)
        at org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor.initialize(IDEWorkbenchAdvisor.java:155)
        at org.eclipse.ui.application.WorkbenchAdvisor.internalBasicInitialize(WorkbenchAdvisor.java:165)
        at org.eclipse.ui.internal.Workbench.init(Workbench.java:789)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1325)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
        at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
        at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
        at org.eclipse.core.launcher.Main.run(Main.java:644)
        at org.eclipse.core.launcher.Main.main(Main.java:628)

!ENTRY org.eclipse.osgi Oct 04, 2004 18:44:07.924
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: org/eclipse/core/resources/IProject
        at org.eclipse.ui.internal.ide.model.WorkbenchAdapterFactory.(WorkbenchAdapterFactory.java:26)
        at org.eclipse.ui.internal.ide.model.WorkbenchAdapterBuilder.registerAdapters(WorkbenchAdapterBuilder.java:33)
        at org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor.initialize(IDEWorkbenchAdvisor.java:155)
        at org.eclipse.ui.application.WorkbenchAdvisor.internalBasicInitialize(WorkbenchAdvisor.java:165)
        at org.eclipse.ui.internal.Workbench.init(Workbench.java:789)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1325)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
        at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
        at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
        at org.eclipse.core.launcher.Main.run(Main.java:644)
        at org.eclipse.core.launcher.Main.main(Main.java:628)

And that's no help.

From an hour or more of careful experimentation, I determined that deleting the file C:\workspace\.metadata\.plugins\org.eclipse.core.resources\.snap lets Eclipse start back up ... but loses all my projects. This includes my current project (no uncommitted changes) as well as my jakarta-tapestry project (yes, uncomitted changes!).

Sometimes the computer knows when you are having a bad day, and decides to make it worse!

45 comments:

  1. Anonymous7:55 AM

    Thanks, deleteing those files worked for me!

    ReplyDelete
  2. Anonymous3:14 AM

    Thanks, deleteing those files worked for me!

    ReplyDelete
  3. Anonymous11:48 PM

    You guys are awesome. I thought I was screwed.

    ReplyDelete
  4. Anonymous1:16 PM

    dto - awesome hint. worked for me as well - thank you guys!!!!!!

    ReplyDelete
  5. Anonymous4:34 PM

    MEGA :) thanks

    ReplyDelete
  6. Anonymous10:42 PM

    Just thought I'd add another "fixed it for me too" post. Thanks!

    ReplyDelete
  7. Anonymous1:28 AM

    Thanks sven_eu, deleting those .snap files worked for me too!

    ReplyDelete
  8. Anonymous2:09 AM

    Thanks too :) You saved my morning

    ReplyDelete
  9. Anonymous1:15 AM

    Deleting those two files worked for me.
    \.metadata\.plugins\org.eclipse.core.resources\.snap
    \.metadata\.plugins\org.eclipse.core.resources\.root\.markers.snap

    I had to reconfigure my project though !
    Thanks a lot !

    ReplyDelete
  10. Anonymous2:29 AM

    Thanks Sven. It woked for me too!

    ReplyDelete
  11. Anonymous1:42 PM

    I had the same exception as you (found this site through googling the exception), but mine was caused when I was trying to build my RCP application. I deleted thos snap files and my build worked again! Thanks!

    ReplyDelete
  12. Thanks guy ! You saved my day.

    Charles

    ReplyDelete
  13. Anonymous6:27 PM

    Saved my life! Thanks!

    ReplyDelete
  14. Anonymous6:47 PM

    Yep, worked for me (using Radrails standalone based on Eclipse). Had to recreate my project structure, but was no big deal -- all the SVN info, modified files, etc, were right back where I left them. Thanks!

    ReplyDelete
  15. Anonymous7:50 AM

    It didn’t work for me. I tried deleting those two files several times (after restoring everything from a backup, of course), but it still got me an empty workspace. I then tried to do some of jens’s stuff, which didn’t seem to do it too, but then, somehow, everything was alright again. I cannot exactly trace back what I did though. I made a diff of the old and new .metadata directory, but it seems a lot of the .marker and .snap files are gone or changed.

    ReplyDelete
  16. Anonymous1:32 PM

    deleting the .snaps worked for me fine on the 3.2..

    A big Thanks to you guys -

    ReplyDelete
  17. Anonymous12:44 PM

    Removing .snap file worked for me as well, although eclipse launches with an empty workspace. Of course, since everything is under source control, no worries.

    ReplyDelete
  18. Anonymous2:17 AM

    none of the above worked for me

    however, deleting an offending .location file for a project, copying another .location file in and editing the path in the file worked.

    ReplyDelete
  19. Thank you, it helped me too.
    The layout was staffed but it was easy to re-import the existing projects back.
    Many thankx

    ReplyDelete
  20. Your entry is from oct 2004. This happened to me today, august 2007. Incredible! What's even more incredible is that this happened on a fresh Eclipse installation with no workspaces so far - it has only been started once before and I was just on my way now to install Eclipse ME.

    ReplyDelete
  21. Sept. 2007. Same problem (what a way to start a week). Same solution. Thanx alot.

    Can anyone elaborate on the cause of the problem and what makes this solution work?

    ReplyDelete
  22. Anonymous9:29 AM

    November 8th, 2007. Eclipse 3.2 under debian (aptitude install --with-recommends eclipse). Sven_Eu's solution worked for me. THANK YOU!

    ReplyDelete
  23. Nov 22 2007, I used sven_eu's solution and it worked for me! Thanks a lot!

    ReplyDelete
  24. January 08. Same problem. I did not see any .snap files to delete and the workspace rebuilder did not fix it. I reverted to a backup copy of the workspace.

    ReplyDelete
  25. deleting the .snap files worked for me as well. February 10, 2008.
    Thank a bunch all. HUGE HELP!

    ReplyDelete
  26. april 04 2008, works! you saved my day

    ReplyDelete
  27. Deleting those two files work! But I do have a empty project space, all you need to do is just to import them again

    I had the problem because yesterday I was adding a jprofiler plugin, that caused the problem...

    ReplyDelete
  28. 2008-05-09
    with Sven_Eu's fix i can now open the IDE. but all my projects have disapeared so i had to import them.

    ReplyDelete
  29. i deleted .markup file. this opened my eclipse however the project was messed up. I simply created a new workspace and imported all my projects with local copy. this worked for me

    ReplyDelete
  30. The suggested fix worked for me too. Thanks!

    ReplyDelete
  31. Same bug :)
    Is it reported to Eclipse Team?

    ReplyDelete
  32. Same bug. :)
    Is it reported to Eclipse Team?

    ReplyDelete
  33. Thanks, it worked for me too.

    I've deleted those 2 files and now my eclipse seems to starut without many problems.

    Im gonna have to import the project since they dont appear in the workspace of eclipse, but i have gained time; thanks for ur help ;)

    ReplyDelete
  34. Fixed here as well, and no projects have been lost in the workspace.

    ReplyDelete
  35. Thanks Sven_Eu
    Worked out fine for me too, I thought I will have to copy the whole 5.5GB of workspace from one of my colleagues, you saved me the sweat thanks

    ReplyDelete
  36. In Jan 2009, this is still helpful in eclipse 3.4.0

    ReplyDelete
  37. Deleting those 2 files just heped me to start ClearQuest 7.1 Designer again. God bless you :)

    ReplyDelete
  38. God bless the internet and you. Thanks, deleting both .snap files worked fine.

    ReplyDelete
  39. It's amazing that over five years on, this is still one of the most popular blog postings I've written!

    ReplyDelete
  40. What's sad is that these problems in Eclipse still persist. Every other application I run can handle a crash with minimal problems.

    But not Eclipse.

    Steve Gibson kind of has the right idea, VIM and ANT have never ever crashed on me. Very solid and reliable, but lacking in the debug tools provided by Eclipse.

    The only problem I have with Eclipse is it being unable to handle crashing... If the Eclipse Foundation could fix these problems, it would really be a solid development platform.

    James
    http://blog.opensourceopportunities.com

    ReplyDelete
  41. And lo, into 7 years, this is still an issue...
    Thankfully the .snap deletion fix still works.

    ReplyDelete
  42. February 2011, same problem, same solution, same result --> workspace works now, projects were gone but I was able to import them again.

    ReplyDelete
  43. february 2013 - same problem. workspace empty after fix.

    ReplyDelete
  44. september 2013
    same problem
    come on eclipse guys sort it out!

    ReplyDelete
  45. september 2013 - same problem, same fix but lost changes to a project which had a few large data files in it :/

    come on eclipse sort it out!

    ReplyDelete

Please note that this is not a support forum for Tapestry. Requests for help will be deleted. Please subscribe to the Tapestry user mailing list if you are in need of support, or contact me directly for professional (for pay) support.

Spammers: Don't bother. I delete your comments and it's a waste of time for both of us. 垃圾邮件发送者:不要打扰。我删除您的评论和它的时间对我们双方的浪费