I have succesfully recovered my existing workspace from a totally messed up situation (all kinds of core components giving NPE's and ClassCastExceptions and the like) by using this procedure:
This whole procedure took me over half an hour for a big workspace, but it did fix it in the end.