What exactly is a "corrupted workspace"? - eclipse

I've been working on an Android project in Eclipse Indigo for a year on a PC that has updates turned off and no new software installed (deliberately to avoid any instability in the java runtime or other installed software).
This morning Eclipse froze and when I killed it in Task Manage, rebooted the PC and restarted Eclipse it failed to launch, saying
"Eclipse failed, Java was started but returned exit code=-805306369”
Googling this I discovered here . . .
http://spacetech.dk/eclipse-failed-java-was-started-but-returned-exit-code-805306369.html
. . . that this is due to a "corrupted workspace". And that I should rename the workspace, create a new empty one, and import the old project into it.
1. What exactly is a "corrupted workspace"? Is there a particular file that's missing or damaged or locked? Can the "corruption" be debugged? A chkdsk didn't show any problems with the disk. I've never had this happen in Visual Studio with C# projects and I do more Windows development than Android.
2. What's the process for importing the old project into the new workspace, and how do I do it without importing the corruption? It's a big project with hundreds of files so I don't want to try to recreate it by hand.

The workspace is a set of configuration files and your projects, though projects can also exist outside of the workspace. The are configuration files for most of the eclipse plugins you have installed, I suspect one of these is causing the problem.
The configuration is stored in a hidden folder in the workspace called .metadata, their is also a log file in this folder called .log. This log file might give you more of a clue as to what has broken.
You can delete (or move it somewhere else) the .metadata folder and eclipse will recreate it next time it's launched. You will then need to reimport your projects and configure eclipse again.
To reimport your projects, use the import wizard from the "File -> Import" menu item. Select the "General -> Existing projects into workspace" wizard. Now click the "Browse" button and find your projects. Select the projects you want to import and click "Finish". Your workspace should now contain your projects again.

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.

One of my project subdirectories has disappeared from Eclipse PHP Explorer and refuses to reappear

The subfolder myproject/wp-content has dissapeared from the project explorer (of course the files are still there, I can see them on windows explorer).
All the other folders and files are still showing up.
I tried deleting the project files (.settings .buildpath .project) and deleting the project on eclipse and also deleting the index on .metadata/.plugins/org.eclipse.dltk.core.index.sql.h2
What else can I do?
I'm using stock Eclipse Kepler 4.3.1 SR1 64-bit with the following add-ons:
Aptana Studio 3 Plugin 3.4.2.201308081736-7W7I57boG98RAi489ctbvKi7VXbq com.aptana.feature.studio.feature.group Aptana
ChromeDevTools SDK 0.3.9.201309080643 org.chromium.sdk.feature.group The Chromium Authors
Chromium JavaScript Remote Debugger 0.3.9.201309080643 org.chromium.debug.feature.group The Chromium Authors
Eclipse Standard/SDK 2.0.1.20130919-0803 epp.package.standard null
Line Number Ruler Fix (Eclipse Kepler 4.3) 0.0.1 de.cdhq.eclipse.linenumberfix.kepler.feature.feature.group CDHQ.de
Markdown Editor 0.2.3 markdown.editor.feature.feature.group Winterwell
Nodeclipse 0.5.0.201309080643 org.nodeclipse.feature.group Nodeclipse organization
PHP Development Tools (PDT) 3.2.0.201306051924 org.eclipse.php.feature.group Eclipse.org
Show Window in Fullscreen 1.1.0.200906152252 gr.scharf.fullscreen_feature.feature.group Michael Scharf http://michaelscharf.blogspot.com/
Word Wrap Feature 0.0.3 de.cdhq.eclipse.wordwrap.feature.feature.group CDHQ.de
[EDIT] I forgot to mention I've also tried to rebuild the project with the same results, and I've also checked explorer view filters in case something weird had happened but there are no filters set.
[EDIT 2] I deleted the Eclipse project files and the whole .metadata folder on the workspace and recreated the project. I had no problem at first, but it has happened again. I haven't touch any settings, just closed and reopened the project.
[EDIT 3] The less invasive fix by now seems to be a combination of deleting h2 database (.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2 workspace folder) and deleting also the project without deleting its files which doesn't delete .build or .settings or .buildpath either, so it can be recreated without much hussle. I can avoid the problem by not closing the project (I can still close Eclipse without loosing the folder), but I still don't know what's causing it.
[EDIT 4] I updated Eclipse and plugins today to their latest versions (Now runnning Kepler 4.3.2) and the problem persists (even if I delete org.eclipse.dltk.core.index.sql.h2 and .settings, .buildpath, .project before importing the project's folder contents as a new project): I just close the project after eclipse finishes indexing it and when I reopen it wp-content doesn't show up any more (unless I force reindexing by deleting org.eclipse.dltk.core.index.sql.h2 again). I do believe this is WordPress related, since it only happens when indexing this particular WordPress deployment (maybe it's one of the plugins/theme files installed inside wp-content or something related to one of the xml files in the root folder, like sitemap.xml?).
For me this happened multiple times, on different project and different folders. Opening+closing or refreshing the project yield no success.
In my case, I have found out that this is related to the Working sets. It seems by default new subfolders and files of a project are not marked belonging to the set, so the project has a mix of old folders (included) and new folders (excluded).
There are two fixes I am aware of:
disable the working sets
Moreover, on large projects, having this mixed state working set made opening the folder structure (and other operations) very slow (3-5 seconds per level). Turning off the working set filter made it instantaneous.
edit the active working set and check the project's checkbox (which will check all subfolders).
This happens to me all the time. I'm on OSX and my projects are accessed from a mounted samba volume. I've found that if I:
open the project in eclipse
eject the samba volume
refresh the project (it will say it cant find it and ask if you want to delete
it... click no)
remount the samba volume
refresh the eclipse project
And the missing files/folders show up. If your folders are local, maybe just moving the project folder would do the same. Unfortunately, this happens very often, and seemingly more often for wordpress projects for some reason.
I'm working with a UI project (Dynamic Web Project) and my web folder keeps dissapearing too. I didn't knew what causes that.
The only thing I knew was how to reset my projet; deleting it from workpsace and reimporting it.
I know now what causes that but I have no answer on why it actually does it. I keep refreshing my workspace because I have some compressing that is done outside eclipse and for my workspace to update them I need to refresh... somehow, the freaking Close Project option is right under the Refresh option, without prompting... and this is when my folder dissapear; when I reopen it.
Try the Import Existing Project would be my guess!
Maybe that can help you find the how of it !
Hi i solve this problem by unchecking "Group by Namespaces" in the little triangle on the top-right of the php explorer.
Issue:
My app directory in my cake php application became invisible after some time. This is bad since all of my non-cakephp framework files reside therein!
My environment:
Macosx
Eclipse Kepler
WebServer: built in macosx in Library/WebServer/Documents which is symlinked to a dir in my home directory.
PHP plugin
What I tried first:
Deleted old project from UI ( retaining files on the file system )
cd'ed to root project directory and deleted eclipse artifacts like .settings, .project, etc
Recreated php project to find that the app directory is still missing!
What worked for me:
I renamed the directory from app to app_back using the terminal/linux command rn.
Eclipse immediate saw the new dir after a clean rebuild.
I renamed the dir back to app and performed another clean rebuild.
Et Voila
It seems that by upgrading Eclipse to last version (Luna), removing the project files (.settings, .classpath and .project) and creating a new project on a new workspace, I can close and reopen the project without having the folder missing from the project explorer.
It's not the solution I wanted (and don't need any more) but it's also a solution, so I'm posting it :-)

Eclipse and Google Drive

My computer at home and my computer at work synchoronized with Google Drive. I created an Eclipse workspace and create an Android project at home. It's copied to my work computer. But I cant open the workspace at work with Eclipse. How can I open an existing workspace with the projects in it by using Eclipse?
When switching to the concerning workspace the project should already be contained as it belong to the workspace. So you don´t need to import the project. In fact importing causes the error you realize.
Probably you don't see the project at work because eclipse doesn´t find it on the path. So you could either make sure that the project (to your google drive and the project) is the same as at home then eclipse should find it. Or copy the project directly into the workspace by removing the project "at home" from the workspace and re-importing it. Choose the option "copy to my workspace" from the import dialog.

eclipse -restore missing projects

For some unknown reason the projects that I created in a workspace are no longer listed in the package explorer tab. The actual files of the programs still exist on the flash drive which was the designated workspace. How do I correct this problem so that I can access the projects in this workspace?
Are you in a different workspace? Try File > Switch Workspace or if you are in the right workspace already, you could try File > Import > General > Existing Projects into Workspace and re-import the projects.
Create new project on the menu, then select the button "Create project from existing source" and select your project directory on disk.
If you are working with Android projects, the straight import does not work. The fastest way I've found to deal with this issue is to move (not copy) the projects to a different location, then import them back into the workspace, making sure copying the files into the original workspace.
At this time, the Android eclipse plugin has a bug in it which will rename your projects to the package names, rather than using the "friendly" names you intended for the projects. Since eclipse quite often seems to drop projects in this way, this can lead to a great deal of frustration. If this bug is fixed, or you know of a workaround, I would appreciate hearing about it.
I had a case where my project disappeared from the workspace and when I tried to import the existing project into workspace, Eclipse reported the project was already in the workspace! So I simply created a new project with the same name/location as the folder in which the project was located. This brought the project back to life in my worskpace. This worked in Kepler version of Eclipse.
I found a way to resolve this issue without creating a new project.
My projects disappeared from the Package Explorer view when I was in the Java EE perspective. When I switched to the Java perspective, they reappeared in Package Explorer.
Version: Mars.2 Release (4.5.2)
Build id: 20160218-0600
Not sure what caused this issue out of the blue and how long this solution will hold.
A simple solution that requires deleting the affected projects from your workspace, then importing them again:
Delete the affected projects from your workspace (do not delete from disk)
Open the files. File >> Open Project from File System >> Select location of files >> Select projects to open.
After you import them, it should work.
Try a refresh (F5) of the workspace.

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.