Eclipse Problems View not showing Errors anymore

JavaEclipse

Java 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):

  1. Project->Clean...,
  2. close and open Eclipse again,
  3. 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.

enter image description here

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

  1. Check your source directory is listed in source folder of project
  • Right-click your project > Build Path > Configure Build Path > Source.
  1. If you are using multiple projects (as dependencies)
  • Project->Clean...,

    enter image description here
  1. Check "Build Automatically" is enabled or not.
  • project > Build Automatically

    enter image description here

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:

  1. Open Problems window (Windows -> Show View -> Problems)

  2. 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):

screenshot showing 'New Problems View' option

The new View does show all the warnings and errors that were detected:

enter image description here

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

enter image description here

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

enter image description here

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.

enter image description here

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:

enter image description here

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionwillView Question on Stackoverflow
Solution 1 - JavaKrzysztof KotView Answer on Stackoverflow
Solution 2 - JavasanatView Answer on Stackoverflow
Solution 3 - JavaAlexander PogrebnyakView Answer on Stackoverflow
Solution 4 - JavaalexeyView Answer on Stackoverflow
Solution 5 - JavaKeesView Answer on Stackoverflow
Solution 6 - JavaChandra SekharView Answer on Stackoverflow
Solution 7 - JavaPsychonautView Answer on Stackoverflow
Solution 8 - JavaidrosidView Answer on Stackoverflow
Solution 9 - JavapreaView Answer on Stackoverflow
Solution 10 - JavaSanthanamView Answer on Stackoverflow
Solution 11 - JavaAleksandar GView Answer on Stackoverflow
Solution 12 - JavaShraeyView Answer on Stackoverflow
Solution 13 - JavaVonCView Answer on Stackoverflow
Solution 14 - Javasherryssj5View Answer on Stackoverflow
Solution 15 - JavaMattCView Answer on Stackoverflow
Solution 16 - JavagRaWEtyView Answer on Stackoverflow
Solution 17 - JavaGerardo RozaView Answer on Stackoverflow
Solution 18 - JavaGabor FarkasView Answer on Stackoverflow
Solution 19 - JavaJustinView Answer on Stackoverflow
Solution 20 - JavagsamarasView Answer on Stackoverflow
Solution 21 - JavaJoel SheppardView Answer on Stackoverflow
Solution 22 - JavaTadele AyelegnView Answer on Stackoverflow
Solution 23 - JavaKetan View Answer on Stackoverflow
Solution 24 - JavaSagarView Answer on Stackoverflow
Solution 25 - JavaRodney FernandesView Answer on Stackoverflow
Solution 26 - Javajava-addict301View Answer on Stackoverflow
Solution 27 - Javauser1023359View Answer on Stackoverflow
Solution 28 - JavaJackView Answer on Stackoverflow