score:31

Accepted answer

Simply restart eclipse, refresh all projects and do a clean build. That should fix it. Don't forget the eclipse restart, else no matter how many times you do a clean build or refresh, it will not fix the problem

score:0

I know the answer is accepted but in my case that solution didn't work for me, I had restored files from a backup to my local project in linux and the files I restored were owned by root with only the owner being able to read/write the files. SO, I sudo chowned the files "sudo chown _R myUser:myUser *" at the base of my project, refreshed in Eclipse (f5) and the annoying repeated failure of my build was a thing of the past.

score:0

If you are writing Maven projects, try right click on the project and select [Maven] -> [Update Project...] It works for me.

score:0

For me there was a different solution than mentioned here.

I was doing a no-no, I imported a project that had a .project file, and there was some errors in the way my version of eclipse was reading some of the files. The package names and files had a little ! symbol with a yellow background.

The solution was to delete the packages. Obviously make a backup. But in doing this most times the files nor the packages were deleted. Instead eclipse refreshed and the desired files were there. Sometimes I had to hit refresh (F5), and sometimes I had to restore files.

I found it best to delete the packages as that is where eclipse was having reading the data.

score:0

If the missing file is still mentioned in the Linked Resources, no refresh and restart of Eclipse will ever solve the problem. You have to delete the file in the Project Properties Linked Resources list.

score:0

For anyone using VS Code with the RedHat Java plugins (which use Eclipse tooling under the hood), I got this error as well. I fixed with the following:

# Quit VS Code
rm -rf ~/Library/Application\ Support/Code/User/workspaceStorage/*
# Reopen VS Code

score:0

As all others said, it is most probably an issue with the internal caches of Eclipse.

I usually restart the IDE with the additional -clean option to wipe out the OSGi-related caches, then clean and rebuild all the projects.

If the problem persists, I realized that cleaning up the single affecting project works better that cleaning up the whole workspace. (Ominous... XD)


This usually happens to me when merging changes that imply renaming or deletion of source files, prior to launching Eclipse.

score:1

It can be related to missing location Select File => properties => Resource => Edit file location.

score:2

Looks like someone has deleted that file but eclipse still think that file is part of the project. Might have happened when someone deleted a file from the source control in an improper way.

If you dont have pending changes then you can get fresh copy of the project and import it into your workspace.

If you have pending changes then take a copy of changes and repeat above step. ( A restart of eclipse may be necessary)


Related Query

More Query from same tag