False compile error Follow
Answered
Hi,
Something strange is happening in Idea..
When I build my project, Idea tells me that I have 3 compile errors. Then I go to the classes with errors but there is no red lines or any other indication og where the errors are in the code. To get rid of the errors I can change one of the methods in my class from public to private, build, change the method back to public and build again. It looks like an Idea caching problem.
Can anyone help?
Regards
Anders
Please sign in to leave a comment.
Hi Anders,
which compiler (Settings | Compiler | Java Compiler) do you use?
Hi Roman,
I am using javac.
Project SDK is java 1.5
Have you tried to rebuild a project completely (Build | Rebuild Project)?
Yes, a rebuild don't fix the problem
Ok, then please do File | Invalidate caches. If the problem is cache-related this should fix it.
Have tried that too.. Same result.
The strange thing is that I can make a fresh check out from subversion, open Idea, compile and the false error pops up..
Well, it's hard to tell more without seeing actual problems.
What errors a compiler reports?
Yes I know. Was hoping that anyone have had the same problem..
The first error: unreported exception java.lang.Exception; must be caught or declared to be thrown
Could you please try to create a small project which reproduces your issue?
I have tried. But no luck.. =/
Same error here.
I'm giving up from JetBrains IDE for java.
Could you please provide a project example to reproduce the problem?
GUYS
```
mvn clean install
```
install the dependencies
I am facing the same issue in Intellij Idea 2019.3.5 ultimate and ran into the same issue. The java file shows a number of compiler issues while no errors show up in the maven build.
I have already invalidated the cache, reimported the project but still the error.
Please try deleting the System directory: https://www.jetbrains.com/help/idea/tuning-the-ide.html#system-directory when the IDE is not running.