Eclipse Problems View not showing Errors anymore
JavaEclipseJava Problem Overview
For some reason Eclipse is no longer showing me Java compilation Errors in the Problems View.
It is still showing Warnings.
This has suddenly happened and I cannot think of anything that I have changed which would affect this.
I am using the "Maven Integration for Eclipse" plugin but I have been for some time - not sure if this could have affected it or not.
Any ideas?
Java Solutions
Solution 1 - Java
I had same problem and randomly did such things as (several times):
- Project->Clean...,
- close and open Eclipse again,
- Run As...
And it started to work again, without changing configuration.
Solution 2 - Java
Right-click your project and go to Properties > Java Build Path > Source.
Make sure your source directory (for example MyProject/src) is listed as a Source folder. Otherwise you won't get any red markers.
Solution 3 - Java
I want to post my story here if Google brings you to this question.
Somehow, "Project->Build Automatically" got turned off.
Turning it back on produces correct errors list.
In my case it has nothing to do with m2e 1.0. This is default behavior for any Java project and goes back as far as Ganymede ( at the point of writing this post I am running Indigo )
Solution 4 - Java
This is not totally an answer to your question, but is related. I thought eclipse stopped showing red/yellow flags next to files in my project. The solution was very simple - I was looking at the Navigator tab (which doesn't show error/warning flags) instead of the Package Explorer tab.
Solution 5 - Java
I installed and deinstalled ajdt-plugin and got the same problem.
Check <Project><Properties><Builders>
.
It should have a 'Java Builder'.
This code should be in the .project file (file is in the root of your project):
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
Solution 6 - Java
- Check your source directory is listed in source folder of project
Right-click your project > Build Path > Configure Build Path > Source
.
- If you are using multiple projects (as dependencies)
Project->Clean
...,
- Check "Build Automatically" is enabled or not.
project > Build Automatically
Solution 7 - Java
I was experiencing this problem as well today. The other solutions presented here (such as cleaning the project and restarting Eclipse) did not work or were not applicable to my setup. What did work for me was right-clicking on the project in the Package Explorer and selecting Maven->Update Project Configuration. Evidently some source folder restructuring I had done the previous day had caused Maven to lose track of things, and issuing this command fixed everything.
Solution 8 - Java
At the top right corner of the problems window (next to minimize) there is a small arrow-icon. Click it and select "Configure filters". There is a severity filter that might have been activated.
Solution 9 - Java
I have the same problem in slight different situation. I have a parent POM and multiple modules under it. Project was existing and I imported it into eclipse. I can change the "Dependency management" only to parent project but not projects under it. They are not showing any compilation warnings.
Next I'm going to try to change them all into individual projects... that's not what I wanted, but I haven't been able to solve this otherwise...
Solution 10 - Java
I have also faced the same problem.
After installing m2eclipse plugin, i was not getting any Java compilation errors.
My solution was to enable dependency management by Select Project -> Right Click (to get context menu) -> m2 Maven -> Enable dependency management.
Now i am able to view Java Compilation Errors.
Solution 11 - Java
Try following:
-
Open Problems window (Windows -> Show View -> Problems)
-
Right click on the error and then Quick Fix
This procedure helped me solve the same problem.
Solution 12 - Java
This is normal problem. In wich order and export function sometimes get turned off.
right click on project
Solution 13 - Java
On Ganymede, check the configuration of the Problem view:
('Configure content') It can be set on 'any element in the same project' and you might currently select an element from the project.
Or it might be set on a working set, and this working set has been modified
Make sure that 'Match any configuration' is selected.
Solution 14 - Java
In my case Eclipse wasn't properly picking up a Java project that a current project was dependent on.
You can go to Project > BuildPath > Configure BuildPath and then delete and re-add the project.
Solution 15 - Java
There are obviously several reasons why this might occur, and I thought I'd add the solution to my issue. (I have a java project into which I have imported files with virtual links)
If you have a situation like mine, you will have another folder on the same level as your 'src' folder. If you do, right-click on that other folder, then select 'Build Path' > 'Add to Build Path' (if you see 'Build Path' > 'Remove from Build Path', then it had already been added.)
To further configure the Build Path, right click on your top level project dir, and select 'Build Path' > 'Configure Build Path'. Your folders should show up in the 'Source' tab.
To configure what errors you see, Click on Java Compiler > Errors/Warnings and then click 'Configure Workspace Settings'. That is the same as going to Window > Preferences > Java > Compiler > Errors/Warnings. If you don't want Eclipse to ignore something, then just change it to Warning.
Solution 16 - Java
If you have reached here that means all the other solutions did not work for you. One reason could be your source folder is not a java project.
Solution would be to run below command on the source folder
mvn eclipse:eclipse
This worked for me.
If this also doesn't work then try removing .classpath and .project file and run the above command again
Solution 17 - Java
What worked for me is creating a New Problems View
(this option is accessible from the three-dots View options):
The new View does show all the warnings and errors that were detected:
Solution 18 - Java
I could reproduce this issue by creating an enumeration with a non-static member class and a static block enumerating its values:
public enum Foo {
Dummy(new Bar [] {new Bar()});
static {
for (Foo foo: Foo.values());
}
private Foo(Bar [] params) {}
public class Bar {}
}
This class breaks the Ganymede compiler. If you delete the line in the static initializer block, the code compiles correctly again, and you get the error that there is no enclosing instance for the new Bar() call, as expected.
-- correction: The above holds only if the project has gaeNature from Google Appengine. However, if you get an error similar as mentioned in the original question, you might be encountering another java compiler bug ...
Solution 19 - Java
I have the same issue with Eclipse Helios and the m2eclipse plugin. They just can't seem to get this thing to work with WTP or WPT or whatever the blasted acronym is.
If I do a clean on the project and watch the Maven console then I can see the compilation issues in the console but eclipse won't touch it. It seems eclipse or WTP/WPT and m2eclipse are busy playing slap hands.
Solution 20 - Java
I experienced that problem with a MapReduce project. I closed the error window and never came back after doing what the other answers suggested.
Click on the bottom left -> Other -> Problems
Solution 21 - Java
Kepler SP2, Java Project (Web Driver), and we use Gradle instead of Maven
None of the above helped, what did fix the problem for me was to select my projects (r-Click) > Gradle > Refresh All
Solution 22 - Java
Pointing the source(src) folder to the build path will solve this easily to do so right click on the project > build path > configure build path > java build path > source > add folder and click Apply
Solution 23 - Java
My mistake was that I was creating classes in resource package...
Creating classes in src/main/java solved the issue.
Solution 24 - Java
Check your filters, sometimes problem view could be scoped to a working set that you are not currently working in. Also, you can check other configurations for the problem view.
Solution 25 - Java
Problem in .classpath I did "Replace with HEAD revision" to get back the version that I had in the repository Git and the errors appear again.
Solution 26 - Java
Duplicates in build path
In my case, errors were not showing up in the Problems View or Package Explorer views because my build path had duplicate entries for src and test directories:
Removing these from Project -> Properties -> Build Path (and just leaving one each) did the trick.
Solution 27 - Java
In my case I setted a old workspace and it was the problem.
Try to set a new folder for workspace
Solution 28 - Java
If "Debug" has been recently activated then check the top right of the program (under the Minimise button) and click back onto Java.