Compile error without any error message
When running a make, or a unit test I get the following, very useful error:
There is an error, but IDEA does not specify anything about where that error might be. There is a list of warnings beneath that, but I can't find any that would cause real harm
What I have determined:
When I run tests in other projects, they work fine. This suggests that it is a project issue, and not related to the SDK
A week ago this test did still run, but I cannot recall any really big changes that have caused this
When I run the test or compile in maven from the command line, it goes fine.
It sais it is a compile error, but I cannot find any class with red underlined compilation errors in there
Anybody have a suggestion what this is, or how to increase the log level of intellij, so I can find the issue?
This is a project with maven and Spring, Java 6, Idea 12
请先登录再写评论。
You could try adding the -verbose javac option to the compiler setting: Settings > [Project Settings] > Compiler > Java Compiler > Additional command line parameters
What happens when you build via maven command line?
The -verbose option I tried myself, but I did not see any additional logging.
The problem has solved itself again, I had "use external build" on, and switching that off fixed it. But when I tried to reproduce it just now, it worked fine, so that probably was not the issue. I also reimported everything, so maybe it was fixed then.
Anyway, thanks for your help
Solution:
This happens for me when my project gets so big and IntelliJ faces so many classes and indexing and so on that simply doesn't bother to show you any errors.
You need to do one or all of the steps i mention to see that nasty error go away:
1- as @... said, add the -verbose to your additional compiler parameter settings.
2- go to your Maven tab and do couple of Clean and Compile in terms of Maven life-cycle and watch the errors and one by one either add the jars and libraries needed or comment the entire code that demands it desperately to just test your current run. you need to see a complete success in your compile.
3- do the most repeated thing in IntelliJ , Invalidate Caches / Restart
Good luck.