1

I started having this problem yesterday. I changed some settings in Eclipse related to compiler warnings (changed some settings related to generic types from ignore to warning), and afterwards, every time I save a file, a bunch of compiler errors appear in places where there were none before, and the only thing that fixes it is Project -> Clean.

The compiler errors are related to:

  • "XmlBaseView cannot be resolved to a type"
  • "CHOICE_YESNO_NO cannot be resolved to a variable"
  • "the import client.rest.views.base.XmlBaseView cannot be resolved"
  • "The method XmlBaseView.getUrn() is undefined for the type XmlBaseView".

I literally add 1 character to a string variable and I get 126 errors in the Java file I edited as well as any other files related to it. I tried changing the settings I changed back to the original values, but it didn't help. I already tried restarting eclipse and rebooting, neither helped.

How do I fix this? I'm using Eclipse 2019-03 (4.11.0).

skomisa
  • 16,436
  • 7
  • 61
  • 102
Nzall
  • 3,439
  • 5
  • 29
  • 59
  • Are you using Gradle or Maven ? – Michael Laffargue Jul 23 '19 at 08:47
  • @MichaelLaffargue No, just the default build/compile in Eclipse. Maybe Ant, but that's configured as an external tool, not my build tool or build script. – Nzall Jul 23 '19 at 08:57
  • You could check: Project settings > Java build path > Source, ensure you have your source folder in it. Else usually the easy way is to create a new workspace and import your project inside. Resolve most of the configuration problems. – Michael Laffargue Jul 23 '19 at 09:27
  • @MichaelLaffargue I'll keep that in mind in case no one comes up with a better solution. – Nzall Jul 23 '19 at 09:34
  • Can you give a complete example of one of your error messages? The full message. – nitind Jul 23 '19 at 14:01
  • A simple option to try is restarting Eclipse using the **-clean** parameter. This old SO question provides more information, and is still relevant: [What does the -clean parameter mean in the Eclipse IDE?](https://stackoverflow.com/q/3430295/2985643). Using **-clean** can't hurt, and it might help. – skomisa Jul 24 '19 at 03:08

0 Answers0