Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sudden weird errors on a project

Tags:

java

eclipse

Today I came to work, happy. But when I opened my Eclipse, I saw that one of my projects has errors.
It's weird because it shows that it has errors only in the window bar, and not in the Navigator. I don't have any Java errors, this is a valid project that was fine all the time:

:_(

Some of the errors on the error log of Eclipse:

  • JavaBuilder handling ImageBuilderInternalException while building: SP_Procedure
  • Cannot connect to VM
  • File <SomeFile> has been skipped, problem while reading ('Resource is out of sync with the file system')
  • Unhandled event loop exception
  • Internal error

When I run an application from this project, I get a warning message but when I proceed, it works fine, but still. It's very disturbing and I'm not sure if it's harmless.

I tried to:

  • Restart Eclipse
  • Restart my machine
  • Clean projects and recompiling them.
  • Refresh projects
  • Pray

Nothing helped. What could be the problem? (I'm using Indigo Service Release 2)

like image 987
Maroun Avatar asked Nov 05 '13 11:11

Maroun


4 Answers

The following nuclear option has desperation written all over it. But I have been where the OP has been with the Juno version of Eclipse.

  • Run a "Synchronize with Repository" and save all of your local updates to a different directory.
  • Delete the project. (Check the box to delete the contents on disk. Scary step, but that's OK, because you saved it in a different directory in the previous step, right?)
  • Read in a fresh project from the repository. It builds happily at this point.
  • Integrate your local updates.
  • Keep on praying.
like image 94
rajah9 Avatar answered Oct 06 '22 08:10

rajah9


Looks that one unused JAR was deleted, but for some reason, I didn't get errors in any file, even in the files that imports this JAR! So what I did was restoring this JAR, delete unused imports and deleted the JAR again.

I've found this error after two days of navigating on this project on each file.. This is weird that Eclipse didn't recognize that1 this is an error, and throw many unrelated errors such as:

  • Cannot connect to VM
  • File has been skipped, problem while reading ('Resource is out of sync with the file system')
  • Unhandled event loop exception

Is this a bug in Eclipse? (All errors and warnings are enabled!)


1 As seen in the image in the question..

like image 27
Maroun Avatar answered Oct 06 '22 08:10

Maroun


A class from the list of imports for the file seems to have moved out or the jar file containing the class is missing. Expand the imports section and check if you find some classes that are missing but have been imported.

like image 2
Utsav Avatar answered Oct 06 '22 09:10

Utsav


Though it is a pain, sometimes the easiest solution is to back up all your projects (either in a repository or somewhere else on your computer) then uninstall and reinstall eclipse. No it's not fun, but it should reset eclipse so everything works again. The downfall though is that you have to reconfigure eclipse to any special settings you had/reinatall any extra functionality currently installed (eg. android add-on) and reconnect to any repositories you have. While punting isn't fun, it can be effective... I hope you don't have to resort to this though.

like image 1
JustWannaFly Avatar answered Oct 06 '22 08:10

JustWannaFly