Eclipse Indigo completely reset itself -- projects and settings gone - eclipse

Launched Eclipse Indigo on Windows XP SP3 this morning and noticed it was taking an unusually long time; I have startup plug-ins disabled and my startup time is usually a matter of seconds.
Finally, Eclipse opened with the Welcome screen. I found that a bit odd, considering my default perspective is the Workbench. So I clicked Workbench and the Package Explorer was empty -- all my projects were gone. Also, all of my carefully tuned preferences had been reset.
Fortunately my project files are still intact and I can import them.
I had this happen before on a Mac with Galileo and thought it was just a fluke, but now it's twice that Eclipse has become self-aware.
I had been using Indigo regularly for months and changed nothing in the preferences or .ini during my last session. I do not use an AV and my computer is free of malware.
This is dangerous behavior for a commercial-grade IDE -- any ideas on why this could be happening and what could be done to prevent it in the future?

This happend to me when i accidentally moved the location of my eclipse workspace, if you cleaned up/ resorted files on your computer and moved the eclipse workspace to another directory location the IDE will appear to reset when opened.
Click File -> switch workspace, then find the location of the workspace and your projects will be restored

My Eclipse Indigo regularly resets itself (1-2 times a week). So I always have a backup of .metadata folder and restore it every time.
I tried to switch workspace but Eclipse tells: "An error occured".

Are you sure you didn't make any changes to your workspace?
Eclipse stores your preferences and settings in your workspace folder.
Maybe something happened to that folder.

Related

Eclipse Error: Cannot determine URI for /project-path/

I'm running Eclipse Luna on Ubuntu 12.0.4 in VirtualBox with a Windows 8 host and every once in a while, I will boot up Ubuntu and open up Eclipse to find this:
My projects should be listed in the package explorer but it's all empty and whenever I try to import the project again, it says no projects are found.
At this point, I usually go to my workspace folder and delete the .lock file and rebuild the workspace but is there an alternative to this? This error happens every ~5 times I reopen Eclipse and it has become very annoying. Any help will be appreciated!
EDIT: Okay I just tried deleting the .lock file in the .metadata folder in my workspace and I'm still getting the same error. Any suggestions?
EDIT 2: While closing my currently open tabs, I got this error. The projects that were open were Maven projects if that makes a difference.
so I am a little late for the party, but I fixed that on reimporting my projects.
Under File->Import.. you choose General->Import existing Projects into workspace. On the next page you set your workspace directory as the root directory for importing, which will give you a warning like "Some projects already exist in workspace". Ignore this and click finish.
After that all my projects where back in my workspace.
Good luck
To solve this problem, I re-created my workspace and imported my projects again.
Creating a new workspace is done via:
File > Switch Workspace
This is not an optimal solution, but until Eclipse fixes these bugs, this can save you some time trying to debug your current workspace.
I previously had a very small number of Eclipse plugins installed. So, I quickly headed to the Marketplace and installed my plugins.
And yes, Eclipse's downfall is expected. I personally find IntelliJ IDEs much better.

Eclipse Kepler won't open on OS X 10.9.1

I installed Kepler on my fairly new mbp running 10.9.1. Initially this worked, but now when it won't open. Clicking on the docked icon shortcut will start eclipse, but the small loading bar gets to slightly past "loading workbench" then the whole app shuts down. Running in the terminal gives me this error:
Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.Workbench$55
I read that others were having Java issues with eclipse on mavericks but I'm not sure that is my case, especially since it was previously running. Please help!
Solved this issue by deleting the .metadata folder, forcing eclipse to create a fresh one. Works great now.
Solution
Delete the .metadata directory will make Eclipse run again.
You can find .metadata folder at your workspace directory.
Consequences
All IDE projects structure will be reset. The projects data
will be kept at the file system.
All IDE configuration data will be reset. You'll have to create it again.
FWIW, I found that it was possible to be more surgical. The issue in my case was in the .metadata.plugins\org.eclipse.e4.workbench folder. Clearing that, I lost my UI state, but all of the projects, SVN connections, etc... weren't lost.

Eclipse workspace issue with CCRC plugin error

Update 28 May 2013:
I have found a work around for this. Though this is not always works MOST of the time it does.
In Eclipse > Preferences > General > Startup and Shutdown
uncheck the option "ClearCase Remote Client plug-in"
Every time I start the problem workspace, before doing anything (like click on any resource or click on project in project explorer) I connect to the ClearCase repository.
This seems to calm down the error most of the time. Also, the Eclipse shortcut that I have on my desktop, has -clean option set in it. So when I start the eclipse my eclipse already starts with the clean up option. Though not sure if it has any bearing on the problem.
However not sure if this will help in a situation when I am working offline; when I can not connect to the ClearCase repository.
Update 21 May 2013:
At this time it looks like there is no resolution for this except a CCRC plugin upgrade.
For now marking VonC's answer as correct. Will update the post if I find a better solution.
I created a fresh new workspace and setup the workspace and so far I do not see any problems so far. Still not sure what was wrong with my workspace though.
==================================================
I have been having this problem for quite sometime on one of the workspace.
Error:
I am seeing the following error pop up with the error message; and will NOT go away.
An error has occurred. See error log for more details.
Could not initialize class com.ibm.rational.team.client.ui.model.common.ImageManager
Symptoms:
It happens only in one work space almost all the time.
Every time I restart this workspace, when ever I click on any projects in project explorer or any open file, it causes the error pop up to come up.
It goes away if I close all files, close the offending project and then delete the project. I fire up eclipse, re-import the project and the issue goes away only as long as I continue using the eclipse. Once I restart the eclipse the same problem persists.
What I have tried so far:
start eclipse with -clean option --> It does not solve the problem.
I have enabled the "Refresh workspace on startup" option in "Eclipse > Preferences > General > Startup and Shutdown" --> this does not solve theproblem.
I deleted the folder "org.eclipse.core.resources" under "Offending_Workspace > .metadata > .plugins" folder --> this has no effect. The problem persists as mentioned in Symptoms3 above.
System Info:
Windows 7 Enterprise Edition 64 bit.
Eclipse 3.7 Java EE developers
CCRC plugin Version: 7.1.0.0 , Build id: 7.1.1.03.00_2010C.D100803
Is there anything that can be done to resolve this. It's frustrating to work with such a broken plugin, that practically hinders ones work.
Any suggestion will be helpful.
This looks like PM38965 and there is no other solution than upgrading:
A fix is available in ClearCase versions 7.1.1.8, 7.1.2.5 and 8.0.0.1
You can see it listed in this release note:
PM38965:
Addresses a ClearCase issue where the ClearTeam Explorer produces a "Could not initialize class com.ibm.rational.team.client.ui.model.common.ImageManager" error intermittently when performing various operations.
The OP reports a workaround:
In Eclipse > Preferences > General > Startup and Shutdown, uncheck the option "ClearCase Remote Client plug-in"
Every time I start the problem workspace, before doing anything (like click on any resource or click on project in project explorer) I connect to the ClearCase repository.
This seems to calm down the error most of the time.
Also, the Eclipse shortcut that I have on my desktop, has '-clean' option set in it. So when I start the eclipse my eclipse already starts with the clean up option.
Though not sure if it has any bearing on the problem. However not sure if this will help in a situation when I am working offline; when I can not connect to the ClearCase repository.
The '-clean' being a local operation, it will have the same effect offline or online.

Eclipse opens blank workspace

I have this weird issue where the following happens:
fresh eclipse juno install (with all updates applied)
works fine for a while asking which workspace I want to open with a dialog on startup
after a few days it stops prompting me for workspace, opens blank made up workspace instead in /Users/myself/Documents
If I check "preferences -> workspace -> startup and shutdown" everything seems fine, the only workspace in the list is the one I created and the checkbox that says "don't prompt for workspace" is not checked.
This happened a few times already on fresh eclipse installations and fresh hard drives (same machine but I replaced the hard drive, re-installed OS and everything for other reasons and now it happened again).
I am on:
OSX 10.7.5
Eclipse Juno (Service release 2)
Any help appreciated!
I have exactly the same problem on OSX, for no reason, one fine day, Eclipse will start-up with a new blank workspace!
And to all the stupid answers and responders out there: YES I know how to set and select a default workspace! And NO creating a new workspace, re-importing lots of projects and loosing all my 30+ database connections under my Toad Extension, is not an option.
What I found is that
For some reason Eclipse creates a directory /Users/user_name/Documents/workspace which is the blank workspace it starts-up with (incorrectly)
My usual workspace is under /Users/user_name/Documents/Development/eclipse
The solution is (this is on Mac OSX, don't know if it is the same on Windows):
Goto your Eclipse directory where you run Eclipse from (mine is /Applications/eclipse)
In {eclipse_dir}/configuration open the file config.ini
Find the line osgi.instance.area.default=#user.home/... and confirm that it is pointing to the bogus workspace directory.
Modify the path of this entry to point to the correct workspace
Save the config.ini file.
Try starting Eclipse and it should open your workspace now.
If your Eclipse get stuck loading plugins now, goto your workspace directory and look for the .metadata directory (its hidden). Inside the .metadata directory, remove the .mylyn directory and restart Eclipse.
Once Eclipse started with the correct workspace loaded, do a proper Eclipse shutdown to ensure your workspace is closed and saved properly.
This worked for Eclipse Juno.
Hope this helps!
Just running this command helped me
eclipse.exe -data C:\Development\Eclipse\Workspace
FYI this happens due to install of some plugins.
This same problem happened to me on Windows on two separate Eclipse installations, without installing any plugin.
I was able to get my working Workspace by clicking on File > Switch Workspace, but closing and opening Eclipse again would reset it to a default Workspace.
What apparently solved this was to force Eclipse to save Workspace settings by ticking the Prompt for workspace on startup setting in General > Startup and Shutdown > Workspaces, which I had turned off.
The next time Eclipse opened, it asked me for the Workspace, and it had my correct one first in the list. I asked not to be prompted again for it and now it opens the right workspace when I launch Eclipse once again.
I solved this problem as per JJ-za's answer, except steps 2 and 3:
In {eclipse_dir}/configuration/.settings open the file org.eclipse.ui.ide.prefs (when Eclipse is not running)
Find the line RECENT_WORKSPACES= and confirm that the workspace is pointing to the correct workspace directory and that multiple workspaces are separated by \n

Eclipse hangs while opening workspace after upgrading to GWT 2.0/Google app engine 1.2.8

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.
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.
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.
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.