Recovering a corrupt Eclipse workspace
Posted by victori
Categories: java eclipse
Recovering a corrupt Eclipse workspace's RSS feed
[5] comments
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.
Bob
PostedAt least on Windows with Eclipse 3.3.0 the directiory is:
.metadata\.plugins
Wolfram
PostedThe -clean option is for re-creating the class-cache in/configuration. It has nothing to do with the workspace as far as I know.
victori
PostedFrom what I have read, you should use -clean when you are having problems with your workspace. I have used it previously on a "wonky" workspace and it did the trick. However, this time around it did not. So I had to resort to this method. I was seriously close to tears when I thought of all the work I had lost. I really did spend a lot of time on those snippets.
james
PostedIt works, but it'd be nice if there was a way that didn't trash all your projects. It seems the .snap file in the org.eclipse.core.resources folder is the culprit; unfortunately it's a binary that can't easily be edited.
james
PostedActually, there is a workspace-rebuilder plugin developed by the Eclipse team: http://www.eclipse.org/eclipse/platform-core/downloads.php
It didn't work in my case, but this might be something to try before deleting the .resources folder.