Eclipse IDE does not start - eclipse

My computer suddenly shut down due to power failure, while I was working on an Android project using my Eclipse Indigo IDE.
Now, if I start Eclipse, only an empty message dialog (see screen shot) appears and Eclipse does not start. What can I do?
(I am using Ubuntu 12.04 LTS)

Mabe Some files found in the .metadata folder of your workspace are damaged, have you tried to launch it by specifying another workspace?
You can manually specify the workspace location on the command line, using the -data command-line argument.
If you don't want to loose a lot of time by trying to fix the problem, you can import your projects into the new workspace, reinstall the plugins that was installed before and everything will be ok. otherwise, you have to take a look on the .log file found in the .metadata folder of your old workspace, analyse the stacktrace and try to understand which plugin is corrupted and delete it manually, and this may take a lot of time, thats why i suggest you the first solution. About the .metadata folder, it is in ~old_workspace/.metadata.

check your filesystems. Maybe something got corrupted when power was lost.
Check my blog post When Eclipse Won't Start and Restoring a Corrupted Workspace in Eclipse

For me, .metadata files were damaged. Since eclipse was not opening at all, changing the workspace was not an option. I deleted following directories, and could start afresh!
.metadata
.buildpath
.project
Hope this helps you as well.
Please note that you will end up loosing all the project settings.

I know my reply is too late. Hope this helps another user.
My Ubuntu in the VMware was shutdown abnormally for some reason. When I logged back in Eclipse would not start. I fixed with the following steps:
removed .lock file in the .metadata folder in the workspace
started eclipse using command line with "-clean" argument
It started fine!!!

I tried to find the corrupted file by removing the files from ~/workspace/.metadata/ one by one until Eclipse could start.
The corrupted file was ~/workspace/.metadata/.plugins/org.eclipse.core.resources/.snap
Once the file was removed Eclipse started normally.

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: "'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.

Ubuntu crashed, Eclipse lost .metadata, Java Perspective gone, missing, lost

I am running Eclipse Galileo on Ubuntu 10.04 LTS.
Ubuntu crashed on me today, and after rebooting, I found that Eclipse has completely lost the Java Perspective (it's like the perspective and all associated views never existed) and the .metadata dir in my workspace is empty except for version.ini.
What's up with that?
Why did it happen?
How can I prevent it?
How can I recover from it?
I ran into an issue - When I installed C/C++ and some collaboration projects (not sure which one), I ran into the same issue. I did the eclipse clean and even tried a new workspace. No help. Ran eclipse -debug -console, found that there were some configurations loaded from ~/.eclipse.
Just renamed that directory and restarted and got back all the perspectives!
First I would try to create a new workspace, and see whether there are the missing elements present. If the other workspace is working correctly, then your original workspace got corrupted.
You can import all projects to the new workspace, and try to use it (although this way you may lose the global settings, that are stored in your old workspace, but at least all your projects and project-specific settings are intact).
On the other hand, if the new workspace also does not work, then you could try launching eclipse with the -clean parameter, or uninstalling and reinstalling it.

Eclipse is not loading?

Eclipse was working fine just a day ago. But today, when I click the eclipse icon, it only loads the splash screen and nothing else thereafter, I even don't get to see the splash screen which contains that 'green loading sign' at the bottom, and -- while monitoring the eclipse.exe in Windows Task Manager(just after starting eclipse) -- I saw that even after the splash screen went off the screen, the eclipse.exe process went with it, after a few seconds. Keep in mind that I did NOT see any warning or error messages because, (I'm assuming, that the loading haven't gone to a point where it is capable of sending any error message)
Hence, I tried reinstalling eclipse, by copying from INSIDE the .zip directory of the installation folder and pasting it inside the eclipse program directory. But the exact same problem persists. So, now I'm currently downloading the latest version of eclipse to retry again.
Any other Advice?
UPDATE
It turned out that the hard drive containing the workspace was partially corrupted, hence I cleaned it; following that, the workspace data was still accessible. (Though usually I still keep a backup on hand.)
just delete the .metadata folder from workspace and reload the eclipse. It worked for me.
Hoping you have the links to the update sites for your installed plugins, my advice is to download eclipse, download your already installed plugins from their update site's and then open the new eclipse and set the workspace to your actual workspace. More far than that is to trash your time... trust me.
It turned out that the hard drive containing the workspace was partially corrupted, hence I cleaned it; following that, the workspace data was still accessible. (Though usually I still keep a backup on hand.)
Probably something went wrong with Java. Try re-installing Java run-time.
It also can mean a problem with the eclipse.ini file (like an extra space at the end of the line), or a problem with the JVM path (since the splash screen is displayed by the eclipse.exe, before loading all the eclipse Java classes).
Check that eclipse.ini file and consider my ini file as a good optimization source.
If your workspace has been corrupted your safest approach is to create a new one.
I would actually strongly suggest that you reinstall everything that might have been corrupted, to avoid as much strangeness as possible. This includes the underlying OS.
I have tried out both
(1)E:\eclipse-standard-luna-RC3-win32\eclipse -clean in run
(2)deleting .metadata folder from workspace
I do not which one worked for me.Thanks...

eclipse stuck when building workspace

I am using eclipse 3.4.1 Java EE under Vista. It seems to like getting stuck when building my workspace. Canceling the build doesn't seem to do anything as well.
Why is this happening and how do I fix the problem?
I was able to fix this with the following:
First, exit Eclipse. Then temporarily move the following .projects folder to a safe location:
mv .metadata\.plugins\org.eclipse.core.resources\.projects projects
Start and exit Eclipse, then move the .projects folder back to where it was originally:
mv projects .metadata\.plugins\org.eclipse.core.resources\.projects
Use at your own risk, of course.
Some time it's very helpful to execute eclipse from command line with "-clean" parameter to enforce it produce clean up for workspace.
eclipse -clean did not work but following did
eclipse -clean -clearPersistedState
Eclipse often freezes for me at 44% if I'm debugging Android over USB.
When disconnecting the device, Eclipse starts.
The accepted answer allowed me to get Eclipse started again, but it seems that the projects lost their metadata. (E.g., all the Git/Gradle/Spring icons disappeared from the project names.) I have a lot of projects in there, and I didn't want to have to import them all over again.
So here's what worked for me under Kepler. YMMV but I wanted to record this just in case it helps somebody.
Step 1. Temporarily move the .projects file out of the way:
$ cd .metadata/.plugins/org.eclipse.core.resources
$ mv .projects .projects.bak
Step 2. Then start Eclipse. The metadata will be missing, but at least Eclipse starts without getting stuck.
Step 3. Close Eclipse.
Step 4. Revert the .projects.bak file to its original name:
$ mv .projects.bak .projects
Step 5. Restart Eclipse. It may build some stuff, but this time it should get through. (At least it did for me.)
Step1:
Open project directory and edit .project file, remove following lines to disable java script validation.
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
Save file.
Step 2:
Go to Eclipse installed directory and open eclipse.ini(or sts.in if you have STS), change xms and xmx value based on your RAM size of your computer.
-Xms512m
-Xmx1024m
-XX:MaxPermSize=256m
OR: in windows, go to eclipse shortcut in desktop, right click->properties-> add following:
C:\software\eclipse\sts-3.6.2.RELEASE\STS.exe -clean -Xms512m -Xmx1024m
Run Eclipse.
Go to Eclipse->windows->preference->Validation, enable Suspend all validators. Do this if you don't want do any validation listed in the list given in Validator panel.
I have this problem whe I have too much maven projects open at once. What I tend to do is:
Restart eclipse (sometimes I need to kill eclipse)
Disable automatic build immediatly (project > uncheck Build automatically)
Right click the project(s) I want to have rebuild
Close unrelated projects
Re-enable automatic build
This enables a functioning rebuild in 99% off the cases in my workspace.
You may want to take a look at How to report a deadlock. You may also want to check the Error view and/or the error log ([workspace]/.metadata/.log). If that doesn't help, you'll probably need to include more info about which plugins you have installed and which projects you have. Can you create a minimal workspace which reproduces the problem?
I faced Similar issue in Eclipse Indigo. I changed the HeapSize it started working correctly. I just added following eclipse.ini file
-vmargs
-Xms1024m
-Xmx1024m
It worked fine after increasing the VM size
The only solution for me (Luna 4.4.1) was this:
Go to Project Properties > Builders and then uncheck the Javascript Validator.
I had same issue with my Eclipse and as a solution, I created new project, copied all resources manually (using windows copy/paste) to new project, deleted old project and that's it.
Sometimes, this happens due to improper System shutdown and Eclipse workspace started facing similar issues.
Hope it will work.
Unselect automatic build using Eclipse-> Windows->Preferences helps fixing this issue.
Deleting some of the JDT indexes (in .metadata.plugins\org.eclipse.jdt.core), particularly the big files, often fix or ease the problem for me.
I just had the same problem.
By using Task Manager to kill the build process and exiting Eclipse with no projects open, I was able to get back into Eclipse and clean the project without opening it. I then restarted Eclipse again,loaded my project and all OK.
I've found that this might also happen if you rebuild a workspace with a project containing a lot of image data (such as a dedicated images project). Might be best to put something like that into its own workspace and handle it separately to the rest of the projects you deal with.
If you can't, then don't clean that project when you clean and rebuild. Only rebuild when necessary.
In my case problem arise after importing downloaded project - stuck at 80% build. Solved by adding write permissions for group to project's files (Ubuntu 12.04).
In my case it helped to remove the source folders from my favorites in the Windows Explorer (Windows 8.0). It seems that the build was not actually stuck, but triggered in some kind of infinite loop (as mentioned here - Bug 342931).
Sometimes the problem seems to be fixed by killing other programs which have files open from the project folder.
Looking at the logs in [workspace]/.metadata/.log provided useful information for me.
Turned out there was a java.lang.OutOfMemoryError: PermGen space error when the workspace build would hang.
This can be edited in the eclipse.ini or sts.ini(If you are using SpringSource Tool Suite) file.
I faced the same problem when I tried to install Angular.js with bower in my project. I seems bower has lots of javascript files it downloaded automatically which caused my IDE to stuck in validation process for a long time. So, I solved this problem this way,
I first installed tern.js 0.9.0.
Then I went to the project properties, selected tern script path
included only the path I needed for validation, My project's
javascript folder. I excluded other path like placeholders,
Angular.js files, Jquery files.
I selected the Javascript from the properties again and did the same
things in include path's source.
My IDE currently working without freezing. I took help from there. Tern
I guess it can be helpful, where any IDE stuck due to lots of Javascript file.
I tried lots of these suggestions, but the only thing that finally worked for me was creating a new workspace, and freshly checking out all my projects into that folder. Then it worked fine ;-)
I just restarted eclipse and it started working the next time.
Refresh all the projects u want to build.
Worked
Restart eclipse.
It worked for me several times.
I was able to solve this by removing extra folder that Eclipse had created in my eclipse installation folder. I didn't install and I was using Eclilpse Neon 3 with Spring Tool suite also installed. But, when I looked into extracted eclipse installation, I had C: folder which had some folder structure. It was mirror image of my Downloads folder. I removed it and restarted.
It worked for me!
None of the the answers here worked for me. What worked was to delete the following folder
C:\Users\your username\workspace\project
name.metadata.plugins\org.eclipse.core.resources.projects\project
name\.indexes
Rather than debug and find the exact root cause(s) for this, I just deleted the projects and the metadata folder. Eclipse will rebuild the .metadata file the next time it's launched.
I then pulled in the latest project code and the problem was solved. It was more work as I had to reconfigure everything, including my servers, but build workspace had been stopping at 50% for anywhere from 3 to 5 minutes before it would completely finish, so it was worth the effort.
Also, I've found that with Eclipse, if you stop the build workspace before it completes and shut down Eclipse if that hangs up everything, you can really mess up your configuration and waste lots of time trying to get it stable again. I'm using Eclipse Oxygen, but I've had this happen in all the versions of Eclipse I've used, so I really try to avoid it, if possible.
Inside the project folder open .project file. There is a bad entry and it might help
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
If you are using Maven as a build tool you might want to:
Close eclipse
Delete dependency directories located in .m2/repository/ - in
Linux
it's located under Home directory and in Windows it should be in c:\Users<YourUsername>.m2 (replace '' with your
username)
Start Eclipse and enjoy normal work :)
That helped me resolve this issue and I hope it helps you too. :)
Cheers!
P.S. I've edited my answer (as #howlger asked) where it was also suggested to delete .eclipse and .p2 folders as it can do harm (although it did NOT in my case + I had to reinstall some of plugins I'm using).
In case there is a problem on start when building your project disable the build automatically from menu. Project -> Build Automatically. This solved my problem while more sophisticated solutions could not.