Recovering a corrupt Eclipse workspace
Today as I sat down at my cubicle and did my daily routine to initiate eclipse. I encountered a horrible sight; eclipse would start and all of a sudden just crash.
I first tried the obvious solution, to clean out the workspace.
./eclipse -clean
Nope, no go, still eclipse kept crashing. Ugh, I fell into despair, all those key-binds and spring templates, all gone. So, rationally I hopped on to #eclipse on irc.freenode.net to get some feed back on my situation. Rcjsuen was kind enough to provide the answer that would solve my problem.
The solution was fairly straight forward. I had to remove org.eclipse.core.resources from my workspace.
cd ~/Documents/workspace/.metalog/.plugins rm -rf org.eclipse.core.resources
By removing org.eclipse.core.resources, you clear out all the project metadata from your workspace. However, don’t worry, once you start eclipse you can just go to “File -> Import -> import eclipse projects” and re-import all your workspace projects.
151 comments so far
Newer Comments »Leave a Reply
Pingbacks/Trackbacks
- Sönke Greve » Blog Archive » Eclipse “could not load/create … Plugin”
- t8d blog » Blog Archiv » Eclipse Workspace wiederherstellen inklusive SVN
- Eclipse refactoring methods (specifically extract method) have stopped working | Gravity Layouts
- Eclipse locking up/not responding? Try this … | Doctor J's Blog
Thank you! I was experiencing a different problem, but your solution fixed it. Many Eclipse commands stopped working, including Open Type and Refactor. They would produce “internal errors.” Now everything’s back to normal.
Much appreciated!
Hi,
I am not even able to access workspace dir. When I try to open the dir it says:
D:\eclipse>cd workspace
Data error (cyclic redundancy check).
Is there a way out or have I lost all my development?
Thanks,
Rahul
Don’t know.
Excellent. That helped a lot. Thanks!
Thanks!!!
Thx – saved my day!
Solved my problem, thanks!
However, if you are using a multi-module maven project with eclipse and the m2eclipse plugin, a simple project import didn’t get things set back up as they were. Here is how I got things working again:
http://blog.tauren.com/2009/10/repairing-corrupt-eclipse-workspace.html
Yep, saved my day too!
FYI – mine was in …/workspace/.metadata/.plugins rather than .metalog
I am using Galileo.
I agree with Andy, same location.
../workspace/.metadata/.plugins/ was where I found mine too,
Made my day! I had tried this earlier before seeing this seeing that plugin mentioned in the log. I backed out when I brought up eclipse and it had the correct tabs, but just claimed it couldn’t edit. So I tried the import as advised above, exited and came back in and it works again!
Thanks much.
Thanks! I was stumped and this helped me.
Just one of the few simple things that save the day.
Thank you Victor!
Thanks!!! Worked for me too 🙂
For me, it was even a little easier:
I just deleted “.snap” in the folder “org.eclipse.core.resources”. That didn’t damage (or reset) my workspace but Eclipse came up again 🙂
I don’t know if that works for everyone, I just had a single project in the workspace.
This posted helped me – however, I did make a backup of the workspace before I removed the resources folder. Once it was removed I opened Eclipse, imported my work spaces, then saw some strange errors around web.xml. I did a Project->Clean and that which took care of it.
Thanks.
Thanks. This saved my workspace!
Thanks, you saved me a lot of time. I logged my problem and solution here.
Like Chris suggested: deleting “.snap” in the folder “org.eclipse.core.resources” worked out for me.
I have now and then (today for example) had the search for references function break down on me. Starting with -clean does not help and building a new workspace (which I have done a few times as well) feels a bit too much. What I have found is that if the type related stuff start to act up, closing down Eclipse and then removing all .index files from .metadata\.plugins\org.eclipse.jdt.core give you a good chance to get back to normal when you start up Eclipse next time.
Worked for me .. I have Galileo
Thanks a lot! Open Type (Ctrl+Shift+T) new indexes the classes again. Great news. Tried many other suggestions, but this one made my day! Galileo here. Just deleted all files under workspace\.metadata\.plugins\org.eclipse.core.resources\
I also removed the “.snap” file in the “org.eclipse.core.resources” and it’s working. thanks!
Great tip!Worked for me!Thanks!
Thanks a lot! Worked for Weblogic Workshop also..
Thanks….
Thanksa lot Victor..!!
Saved my time…:)
–Shrinivas KB
The symptoms were not the same, but it helped anyway. Seems to work like a universal magic potion… 😉
Thanks a lot!
Excellent… I was really worried… your fix done a magic!!! awesome… thanks!!!
Thanks …It worked for me also.. Good research 🙂
Thanks for the post – very useful (using Helios).
thanks it saved my a week work
Thanks, it worked for me.
Thanks man! saved my day!
One comment; instead of .metalog use .metadata in newer versions of eclipse.
Great and simple Fix. MAny Thanks
You saved my day. thanks man!
Thanks a million! Was irked at the weirdness of the problem. Just an import saved my day!
Thanks…
That saved my day (perhaps more than a day) 🙂
Thanks. you saved my day.
lots of thanks. saved may day…
Yet another day saved. Many thanks.
Removing .snap seems to work for me. Thanks!
You have to create new workspace and
import the project from existing workspace(damaged one)
now it works well
Thanks!!! Solved my problem too! My ant on eclipse was not working properly, it keeps cheking project and dont get done, after this trick its ok! Thanks alot! =D
Removing org.eclipse.core.resources/.snap helped me. Eclipse finally started, all projects are in workspace. Thanks!!!
It work perfectly thanks a lot… 😉
Worked for me too – thanks!!