问题
After upgrading to the newest GWT/Google app engine I have problems opening my workspace in Eclipse. On startup, Eclipse hangs almost immediately and needs to be closed. This happens only in the workspace where I use GWT with app engine, and I weren't able to consistently reproduce it - sometimes it starts normally, and sometimes I need to kill the proces and restart it. There is nothing in Eclipse error log. Eclipse version is Galileo, running on Windows 7 RC.
Anyone else had similar problems? I googled but Google is not my friend today.
EDIT: Still happens after upgrading to GWT 2.0.1.
回答1:
I got frustrated with not being able to open my workspace today, and finally solved this by importing projects into a new clean workspace.
- Create new workspace and open it in Eclipse (to create .metadata folder).
- Close Eclipse.
- Manually copy all settings from old workspace (the most important settings are stored in the .metadata/.plugins/org.eclipse.core.runtime/.settings directory). Alternatively, you could use File / Export / General / Preferences in Eclipse, and then File / Import them, but I wasn't able to open workspace to do that.
- Open the new workspace.
- File / Import / General / Existing projects into workspace. Select root folder of your old workspace, and take care to check "Copy project into workspace".
- Restart Eclipse and check that everything in the new workspace is working as it should.
- Delete your old workspace.
EDIT: Another, and a bit better workaround which apparently works:
- Close Eclipse.
- Temporary move offending project somewhere out of the workspace.
- Start Eclipse, wait for workspace to load (it should).
- Close Eclipse again.
- Move the project back to workspace.
回答2:
I used "eclipse -refresh". Apparently it hangs on refresh something, the lower right corner tells you, what it's doing. For me it was refreshing the gwt runtime in a specific project, maybe trying to find an update or something. If you don't want to reimport your whole workspace, try -refresh or move this project temporarily out of the way.
回答3:
I just deleted the state.dat file in the GWT project metadata, which seemed to remove the blocking and then triggered a recompilation.
<workspace>/.metadata/.plugins/org.eclipse.core.resources/.projects/<GWT project>/org.eclipse.jdt.core/state.dat
This probably won't serve as a general solution, but it worked for me and it's a lot quicker than having to copy whole projects. Maybe another file will have the same effect. I think the trick is just to "damage" the GWT project metadata enough to have it rebuilt.
来源:https://stackoverflow.com/questions/1958640/eclipse-hangs-while-opening-workspace-after-upgrading-to-gwt-2-0-google-app-engi