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:
Thanks, deleteing those files worked for me!
Thanks, deleteing those files worked for me!
You guys are awesome. I thought I was screwed.
dto - awesome hint. worked for me as well - thank you guys!!!!!!
MEGA :) thanks
Just thought I'd add another "fixed it for me too" post. Thanks!
Thanks sven_eu, deleting those .snap files worked for me too!
Thanks too :) You saved my morning
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 !
Thanks Sven. It woked for me too!
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!
Thanks guy ! You saved my day.
Charles
Saved my life! Thanks!
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!
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.
deleting the .snaps worked for me fine on the 3.2..
A big Thanks to you guys -
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.
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.
Thank you, it helped me too.
The layout was staffed but it was easy to re-import the existing projects back.
Many thankx
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.
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?
November 8th, 2007. Eclipse 3.2 under debian (aptitude install --with-recommends eclipse). Sven_Eu's solution worked for me. THANK YOU!
Nov 22 2007, I used sven_eu's solution and it worked for me! Thanks a lot!
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.
deleting the .snap files worked for me as well. February 10, 2008.
Thank a bunch all. HUGE HELP!
april 04 2008, works! you saved my day
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...
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.
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
The suggested fix worked for me too. Thanks!
Same bug :)
Is it reported to Eclipse Team?
Same bug. :)
Is it reported to Eclipse Team?
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 ;)
Fixed here as well, and no projects have been lost in the workspace.
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
In Jan 2009, this is still helpful in eclipse 3.4.0
Deleting those 2 files just heped me to start ClearQuest 7.1 Designer again. God bless you :)
God bless the internet and you. Thanks, deleting both .snap files worked fine.
It's amazing that over five years on, this is still one of the most popular blog postings I've written!
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
And lo, into 7 years, this is still an issue...
Thankfully the .snap deletion fix still works.
February 2011, same problem, same solution, same result --> workspace works now, projects were gone but I was able to import them again.
february 2013 - same problem. workspace empty after fix.
september 2013
same problem
come on eclipse guys sort it out!
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!
Post a Comment