Eclipse: fully remove an old project? - eclipse

I run eclipse on Ubuntu 11.10. I originally created a project in folder foo. I subsequently deleted that project to re-organise folders and I now want to create a new project in folder foo/bar but Eclipse won't let me because it says the the new directory is a sub-directory of an existing project.
How can I force Eclipse to forget about the original project so that I can create the new one?

In general, the deleting the project from the "/.metadata/.plugins/org.eclipse.core.resources/.projects" should work, but if you're using 'working sets', you might have the problem I had once, which is basically have a 'ghost' project in your workspace that you can't delete because it says "this project doesn't exist anymore".
If this is your problem, try to delete an entry for your 'ghost project' in the file:
"/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml" (on MacOS).

Delete the project from /.metadata/.plugins/org.eclipse.core.resources/.projects and not the whole .metadata folder will save all other projects and config.

I have also encountered this problem, except it's been in Windows. I didn't want to completely remove the .metadata folder and none of the other solutions fixed it.
I managed to fix it by removing the file workspace\.metadata\.plugins\org.eclipse.core.resources\.safetable\org.eclipse.core.resources while Eclipse was closed. The file gets saved when closing Eclipse so I guess it is cached while Eclipse is open.

Go to your workspace folder using some file manager (you can find your workspace location, be clicking File -> Swich Workspace...) and delete your foo folder, or simple remove its contents (.project file being most important). Then you should be able to create your new project.

I finally managed to fix it by deleting the workspace/.metadata directory. This resolves the problem but has the side effect of making eclipse forget everything about the workspace so I'm not sure it's a recommended way of fixing the problem.

I am running Eclipse Kepler on OS X Mountain Lion, and I had a similar problem. I deleted a project and tried to recreate it in the same location. Eclipse gave me an error saying that the project already existed. I discovered that if I close Eclipse after deleting a project, then reopen it, Eclipse finally 'forgets' the deleted project and allows me to re-create it.
(This question was posted over 1.5 years ago, and I'm guessing that Bruno already tried this and it didn't work. I just want to let others know that this solution worked for me now on Kepler.)

I had the same problem, with Egit and repositories that I deleted and imported back again, instead of importing as general project choose import as existing project.

maybe you can try to delete the folders:
"/your_workspace/.metadata/.plugins/org.eclipse.core.resources"
"/your_workspace/ProjectName"

If the Project was in a working set before you deleted it, you might have to manually remove it from the set.

Instead of deleting any file, rename it, so if whatever you try doesn't work, you can revert.

Related

Restore Eclipse Workspace

I zipped my whole workspace once in a while and want to reanimate it now. Some stupid sync crashed my current state. What I tried is to unzip it and then changed the workspace of eclipse to the newly generated folder.
The problem now, my Eclipse is blank containing now projects at all, the Package Explorer is empty, even after pressing F5? Any suggestions?
Do I have to use same Eclipse Version, which I used when producing the zips? Does a Computer change from 32 to 64 Bit or visaversa make a difference.
Thanks in advance!
I would delete your .metadata folder and re-import the projects manually. The metadata will be automatically regenerated.
Did your zip file contain the hidden .metadata folder? (This is where Eclipse stores preferences and launch options.) If not, that may be reason why you don't see your projects as before.
You can try to import existing projects. Then you should at least see the projects again.

Eclipse: "'Periodic workspace save.' has encountered a pro‍blem."

I'm using Eclipse Indigo on Mac 10.7.4. While working, I get these periodic, annoying dialogs
'Periodic workspace save.' has encountered a problem.
Could not write metadata for '/.org.eclipse.jdt.core.external.folders'.
/Users/davea/Dropbox/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.jdt.core.external.folders/.markers.snap (No such file or directory)
I seem to be able to continue as normal, but I was wondering how I can eliminate these errors.
I had the same problem.
'Periodic workspace save.' has encountered a problem.
Could not write metadata for '/External Files'. D:\java\fuentes\.metadata\.plugins\org.eclipse.core.resources\.projects\External
Files\.markers.snap (El sistema no puede hallar la ruta especificada)
I created the folder "External Files" and it worked fine. In a few minutes the files ".markers.snap" and ".syncinfo.snap" appeared in this folder and the message didn´t appear any more.
I fixed mine by closing eclipse and deleting the whole .metadata folder inside my workspace folder.
Today I faced the same issue consistently, whenever I exit the eclipse.
While trying the above solution provided by TS.xy, the below steps got rid of this issue for now.
Switch to new workspace and close the Eclipse.
Open the Eclipse with new workspace and after that switch to the actual workspace(in which
exception occurs).
Actual workspace loaded with all my previous projects.
Now exiting the Eclipse, does not result in that exception.
Hope that this step may work for someone.
Just for another data point, none of the above helped my situation. The way I finally got past this issue is that each time Eclipse complained about some folder not being there, I went on my hard drive and created the folder. E.g. after I see
Could not write metadata for '/servers'.
C:\...\.metadata\.plugins\org.eclipse.core.resources\.projects\servers\.markers.snap (The system cannot find the path specified.)
I create the "servers" folder (not the file inside it). This gets me to the next error. I went through 3-4 of these iterations (exiting Eclipse each time to force the save) before the issues went away.
HTH, Mark
This was simple for me -
Solution
(pre) the listed directory is not present, see pic
Run Eclipse, see the error shown in pic below. Close Eclipse
Create the directory (RemoteSystemsTempFiles) where it is looking
note: ignore the items in this folder (e.g. .markers), they are auto-generated
Restart Eclipse, problem solved!
Example Problem Message
Not sure why this took me so long to resolve, but quite easy now, and quite obvious in retrospect! ;)...
Using Ubuntu, got the same issue
I noticed that the owner of some of the directories in
~/workspace/.metadata/.plugins/ ...etc...
was root
changed owner to me and the error stopped happening.
Looks like the same sort of issue may be caused by multiple causes.
Close the Eclipse , Clear the .metadata folder completely.. Start Eclipse & Import the necessary project once again if your project references are deleted..
The solution that work for me is the following:
Delete .metadata folder
Restart eclipse
Solved it by setting workspace on a local folder, and set data from import project, from existing resources.
I encountered the same problem , my resolution was to rename the the folder name under the workspace folder. i.e. com.ibm.collaboration.realtime.alertmanager.embedded was renamed to com.ibm.collaboration.realtime.alertmanager.2embeddedxx and rebuilt my project.
In my case, because I've accidentally deleted my workspace folder, and I observed the 'Periodic workspace save has encountered a problem". To solve this issue, I just simply create a new workspace and load all my projects to the new one. Hope you can solve your problem by doing the same thing.
I also ran into this problem. My situation was a little different. I was using 'working sets' to group my projects inside of eclipse. What I had done was attempt to delete a project and received errors while deleting. Ignoring the errors I removed the project from my working set and thus didn't see that I even had the project anymore. When I received my error I didn't think to look through my package explorer with 'projects', opposed to working sets, as my top view. After switching to a top level view of projects I found the project that was half deleted and was able to delete its contents from both my workspace and the hard drive.
I haven't had the error since.
I had gotten a little too aggressive about removing some directories in my project area when I was running out of disk space, and deleted this directory. Eclipse can leave some huge core files if it crashes in your workspace directories, (I had 35 gig of them) so it's worth taking a look there in your workspaces occasionally.
Anyway, as per the problem I tried the 'create a directory' approach. And it worked.
I was also seeing this error when I closed Eclipse by the way, not only after the 'periodic save'. So the exit/restart was also part of this.
Note that the last item on the directory path specified in the error message is a file -- not a directory, so don't get confused here. Probably worth checking that the directory permissions are created correctly as well (as the other projects in the workspace I think).
Obviously this is a bug in the Eclipse code base, (creating the full directory path under the file that is being created), but had I not deleted it in the first place, I would not have caused it in the first place.
I have the same problem since yesterday. Yesterday, I fixed it by creating a new workspace and reimporting the projects. It seemed to work well, but today it started again.
So, today I created the folder and the file manually and gave the full permissions -rwxrwxrwx.
Seems to work again...
Close Eclipse. Open RemoteSystemsTempFiles folder in Workspace, and clear inside this folder. Again open eclipse and close, warn about .project. Press Ok, then open Eclipse.
Solved my problem that.
I ran into this problem today after they switched our anti-virus software to Kaspersky.
In my case, the platform is Windows 7. My workspace is stored on mapped network drive. The strange thing is that, even though this appears to be a permission issue, I could manipulate files and folders at the same level as the inaccessible file without incident. So far, the only two workarounds are to move the workspace to the local drive or to uninstall Kaspersky. Removing and re-installing Kaspersky without the firewall feature did not do the trick.
I will update this answer if and when we find a more accommodating solution, though I expect that will involve adjusting the anti-virus software, not Eclipse.
In my case, the drive I was storing my workspace on had become full downloading SDK updates full and I just needed to clear some space on it.
This happened to me because i deleted one of the resources files inside the .metadata folder in my workspace.
After trying all methods, deleting the .metadata folder in my workspace worked.
Infact, this nuke option seems to work when there are a lot of issues related to eclipse bugs. One such example is working-sets. Working-sets are extremely buggy(but useful) and it is there that most of my eclipse problems start.
Hope this helps someone.
I solved the problem switching the workspace.
Go to File (Switch workspace)
Select the destination and create a folder named Workspace
Run a Hello World and close Eclipse (notice that Eclipse creates the folder RemoteSystemsTempFiles automatically)
now copy all your projects into the new folder Workspace
Open Eclipse and if necessary (sometimes Eclipse does not show the projects) import all of them (go to File/ Open projects from File System)
After you exit the eclipse, there would be an specific failed reason.
Mine is that the DISK IS FULL so the eclipse can't write into it anymore.
Agree with #J-Dizzle,
I am a beginner in web-development and had a hard time solving this today.
Had similar problems when I was creating a SpringBoot project in STS.
Tried most of the solutions mentioned but they didn't work.
Tried removing .metadata folder and re-building my springboot project but still nothing worked.
NOTE : I had multiple workspace in STS and this error occurred after migrating a project from one workspace to another.
Solution : All you need to do is restart your eclipse/STS IDE and it will work just fine.

Periodic workspace save could not save safe table?

I'm a newbie and I'm using the IBM RAD which is based on Eclipse. After install I deleted some files that seemed not needed in C:\workspace. Now I get this error:
"Periodic workspace table can not be saved, file could not be found, could not save file table to C:\workspace.metadata..."
Could you tell what I should do to resolve the error? Thanks
If you get this error in Linux environment, just update the ownership of the file below, and make the owner as same as the owner of the workspace folder:
<workspace>/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
This solution works for Eclipse version 4.3
Restore the files you deleted.
If you have no way to do that, create a new workspace (File > Switch Workspace > Other...) and then import your projects from the old one into the new one.
This error message happened to me when I was copying old project files and importing (all) files to new project. I did following and solved the issue:
Created a new workspace, and switched current workspace to that
one, and close Eclipse.
Created a missing folder, in this case, "org.eclipse.core.resources".
In Eclipse, switched to previous workspace, and started working with Eclipse. After a while, Eclipse created necessary files and that error message was gone.
This probably happened beacuse you deleted .metadata folder in your workspace folder in "my documents" folder in windows.
Solution: Reinstall

"Sources directory is already netbeans project" error when opening a project from existing sources

I've installed NetBeans 6.9.1 and installed few updates for it.
Then I've created a new project from existing sources. After a few changes I've closed it. And now I am having an error, when trying to open a new project from existing sources (the same files):
Sources directory is already netbeans project (maybe only in memory).
After Googling it, I noticed it happened not only with me. But I didn't find the correct solution. I've tried to restart the IDE, I've tried to restart the PC, I've tried to reinstall NetBeans. Nothing helped.
Thank you!
I was having the same problem:
Sources directory is already NetBeans project (maybe only in memory).
Netbeans creates a folder in your project named "nbproject". Once you delete that, restart the IDE and you're good to go.
When you create a NetBeans project from existing sources, NetBeans uses the same directory to add its own files: a netbeans folder with .proj files.
Solution: delete the netbeans folder and restart the IDE. Opening a new project should now work.
Go to the folder containing your project
Delete the folder named nbproject
Restart Netbeans
Try creating your project again from the original folder
This means the project folder is already a netbeans project. So instead of adding it as a new project open it as
This happens(i believe) because netbeans tries to version control the files created or edited.
Under the project folder netbeans create a netbeans directory just delete it . This has been tested in Ubuntu. Then you can import your project if php then php using existing sources.
Click File >> Recent Projects > and you should be able to use edit it again. Hope it helps :)
On Windows at least none of these answers work (for me anyway!). I have found the only way is to copy an existing netbeans project folder in to your new project and manually edit the xml project name.
I also opened the private/private.xml and removed the open files xml just incase these caused problems.
Once I'd done this the project works as normal.
I checked the "Put NetBeans metadata in separate directory" tick and it works fine.
This is in 2. Name and Location after you choose PHP from existing source
In my case my project root directory consists ".project". This contain the XML reference of the project name.
By removing this, i am able to create a project.
Usually this happened when we copy source code of a already created project and copied in different folder and try to create a project from it. as netBeans create its folder nbproject in our project folder this folder also get copied with our source code and it give error "Sources directory is already NetBeans project (maybe only in memory)" remove this folder from you newly copied folder and voila you can create a new project.
If this is your own source code and you already have a Netbeans project folder with your source files you should just start with:
File | Open Project...
not
File | New Project ...
because the project is not new.
If it helps anyone else, I had the same problem and the solution was to reinstall NetBeans.
I had tried all sorts of fixes: Deleting the NetBeansProjects folders, checking/unchecking "Put Netbeans metadata in a separate directory", killing/restarting NetBeans, restarting the system, etc. Nothing cleared the message...except the reinstall.
The advice here about removing the nbproject directory is not quite the whole story.
What Netbeans seems to do (and we are guessing at reverse engineering here) is to look for an xml file which has opening and closing project tags in it. This it concludes is evidence of an already existing project. Now if your files have an nbproject directory there, that will contain a project.xml file which contains the said tags. So removing that will do what you want.
But, my files don't have a nbproject directory but still NetBeans tells me there is an existing project maybe in memory. The reason is: my files include a file called pom.xml and that contains the said project tags in the xml (it was created by an entirely different system). Once that xml file is removed, then NetBeans will create an html project for me importing my code.
In sum: look through any xml files in you existing code, and be wary of project tags.
This happened to me when I tried to import an Eclipse project in a brand new NetBeans 7.2.1 install on Ubuntu 12.04LTS.
I mistakenly selected the import projects from workspace (the first option in the import wizard's opening pane) on the first attempt, and it opened the project in the original Eclipse workspace path (which was on a usb stick).
From this, I then realized that I actually need the second option - import project ignoring project dependencies, which lets you specifically choose source and destination folders. After closing the project, I tried to import again with the proper option, but it didn't work.
From then on nothing I did helped - restart the IDE, move the source folder, nothing. There was no nbproject folder in the project or /var/cache in the user folder to delete (in-fact there was no nbproject folder in the whole file-system).
Since restart didn't work, I'm guessing that there is a garbage project entry somewhere which Nb reads (See Martin Frické answer above).
After googling along the lines of 'netbeans clear memory project cache' with no success, I opted to reinstall NetBeans -
sudo /usr/local/netbeans-7.2.1/uninstall
sudo ./netbeans-7.2.1-ml-javase-linux.sh
which solved it.
If you are on a Mac, press command shift G and in the box type /users and then go, next click on your user name and navigate to netbeansprojects and open it. Then delete the ones in there that are causing problems. You can then create your project.
Note: I had moved my wordpress folder to my desktop trying to figure this out, so I dropped it back into the origional location and it works fine. So if you did this, just replace the wordpress folder after deleting the problem projects from the netbeansprojects folder and its contents back to the original installation folder.
Hope this helps...:)
This is what I did to solve this error:
1) I copied a folder named "folder1" (and I called the new folder "folder2"). "folder1" was a Netbeans project so it had a folder called "nbproject" inside it.
2) When I tried to create a project out of the "folder2", Netbeans threw an error "Sources directory is already netbeans project (maybe only in memory)."
3) Inside Netbeans delete the project of "folder1". Then, delete the two folders named "nbproject" (one is inside "folder1" and the other is inside "folder2").
4) Inside Netbeans, create two new projects: one for "folder1" and another for "folder2". The error should not appear anymore.
copy an existing netbeans project folder in to your new project and manually edit the xml project name.
reinstall netbeans
copy/move all files/folders (except nbproject/ folder) to a new folder for your project, with a new name.
Try to create a new empty project; then you can copy the public_html to the new project folder and it will appear .
I faced the same issue:
Sources directory is already NetBeans project (maybe only in memory).
The solution is:
Netbeans creates a folder in your project named "nbproject". Once you
delete that, restart the IDE and you're good to go.

Subclipse complains "Path is not a working copy" after moving workspace

I recently moved my Eclipse workspace directory and now Subclipse complains every time I open a file, dumping to the console something like:
Path is not a working copy directory
svn: '[original (pre-move) directory path]' is not a working copy
No such file or directory
This also happens when I explicitly try to view the history of a file. This persists across SVN cleanups, closing and re-opening Eclipse, etc.
Update, checkin, checkout and so on all seem to work fine, and Tortoise doesn't complain at all, so clearly it's not the SVN metadata that's screwed up, it's some Subclipse-specific metadata. Can anyone tell me how to blow this broken metadata away?
Edited to add: "Team > Disconnect" followed by "Team > Share" doesn't solve the problem.
Edited again to add: I've grepped through the whole .metadata directory and one of the project directories for a unique element of the old path and can't find it anywhere except in .metadata/.log (the error message itself) and some old Findbugs warnings. Very nice.
You need to delete the .syncinfo files. This is easily done (in most cases) by closing and opening Eclipse, however you can also do so manually as in the following:
To delete the cache, close Eclipse. The cache is stored in:
[workspace]/.metadat​a/.plugins/org.eclip​se.core.resources/.p​rojects/PROJECTNAME/​.syncinfo
So you can just find and delete all files named .syncinfo in
[workspace]/.metadat​a/.plugins/org.eclip​se.core.resources/.p​rojects
Quoted from this article: http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=868799
I just did a "Team -> Cleanup" and this exact error went away! I also got this error because I moved between machines and the path wasn't the same.
Using Eclipse 3.6 and the Subversion 1.6 plugin.
Update in 2016: Still works perfectly with Eclipse 4.5.2 and Subclipse 1.10.
Edited to add: Nope, spoke too soon. This doesn't fix it. Some files just seem not to exhibit the problem.
The following seems to solve the problem:
Team > Disconnect.
Quit Eclipse.
Blow away .metadata/.plugins/org.tigris.subversion.subclipse.*.
Restart Eclipse.
Team > Share.
Not sure how the old path was actually being stored in the plugin prefs, but it must have been in there somehwere. It's kind of pathetic of Subclipse to store absolute paths, but apparently it is.
There's a bug filed on this, or at least on the same error message. No context. Fifty cents says it gets rejected.
I'm sure there are many causes with different solutions, but I found the one that worked for me at Dan Wilson's blog. Simply remove the offending folders from the workspace (probably saving them if they have new content), update (letting Subversion recreate the folders), then move the contents back into the fresh folders in your workspace.
I got the error when I tried to rename a class by changing the case from DAO to Dao in Eclipse.
I had to rename it to something like Dao2 and then was able to rename it to Dao.
What worked for me:
Do a "refactor - rename" on the project => after that do it again to rename it back to the original name.
I was having the same error message using subclipse with javahl on a project that is out of the workspace directory. Changing to svnKit has resolved my problem.
Hard to say without further information.
Did you move the whole workspace or just the content?
Also, you can try creating new workspace from scratch and check out the whole project again.
Alternatively, you may try deleting the .metadata directory and relink the project again using File -> import -> existing project into workspace and then relink the SVN data through Team -> Share projects (with an 's'), or maybe just do this last bit after first disconnecting the project from SVN.
Right click the project folder : Team -> Update to Head
This will bring back the directory. Delete it again and Commit
In my case I had the folders of the projects in the Project Explorer and just had to reopen the project
For me, this error message was caused by an out-of-date installation of Subclipse, and the underlying SVNKit and JahaHL libraries. I have been using TortoiseSVN outside of Eclipse to manage my project directories, and my recent upgrade to the 1.8.x series of (Tortoise)SVN tools broke my working copies for Subclipse.
All I had to do to fix, was go to Help->"Install New Software..." and click "Add..." to add a new update site. I picked the latest update site for the latest release on http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA and upgraded Subclipse from there.
Then all my existing projects just worked, and I could reconnect to the one I had already tried disconnecting from without problems.
I have the same problem
I had a new project, added it to SVN. Then everything works as normal, until I try and refactor-rename any java file, I get:
move D:/dev/sk_ws/ge-parent/ge-core/src/main/java/com/skillkash/ge/beans/Skbean.java D:/dev/sk_ws/ge-parent/ge-core/src/main/java/com/skillkash/ge/beans/SkBean.java
Path is not a working copy directory
svn: Path 'D:\dev\sk_ws\ge-parent\ge-core\src\main\java\com\skillkash\ge\beans\SkBean.java' is not a directory
Now the SVN URL is:
svn://qnap/share/MD0_DATA/svn/sk/ge-core/trunk
and the repository root is:
svn://qnap/share/MD0_DATA/svn/sk
Obviously just sharing the project then trying to move a file using subclipe does not work - it must be a bug. I have to do all my refactoring outside eclipse, and hand edit all the files which are affected.
checkout the whole project to a temp dir, then I copied the first level .svn directory and replaced my working copy .svn folder with this.
http://blog.itopia.de/directory-svn-containing-working-copy-admin-area-is-missing/275
It woks for me.
I had added a png file to my project, but I got this error trying to rename or delete it. Cleaning and refreshing the project didn't do anything.
I went into the svn Team Synchronizing perspective, right clicked on the file and deleted it. That solved my problem.
Right click on the project and select Teams -> Switch to another Branch/Tag/Revision.
Select the appropriate Branch/Tag/Revision that the project should be tied to and click OK.
Give Eclipse some time to process the changes.
Restart Eclipse for the changes to take affect.
I just got this error when I was trying to update some .java files. The problem was I was trying to update the files but the folder that contains that files didn't exist in the path so when I sync and update the folder it works at the first try.
So, dont try to sync files, try to sync the folder.
Sometime ago I had a similar issue. Seems that Subclipse (or Eclipse) stores the absolute path of your working copies. The cleanest solution is to export again your repository to the new path.
If you have non-committed code, then you can copy it on top of the clean export (without the .svn folder)
I too had this issue and I simply deleted the project from the workspace (leaving the files on the files system in tact).
I then imported an svn project into the workspace.
Import->SVN->Checkout Project From SVN.
I used my existing repository location to pull the files in.
This issue was caused when I changed Eclipse editions and used a Subclipse plug-in that was a version ahead of what I should have used.
I uninstalled the newer version and installed the correct older version and all worked well.