[Note: There is another thread about this problem but it did not answer the question.]
For one specific project in Eclipse, the problems view does not show errors. I
I checked the .classpath file of the Eclipse project. It had incorrect value of src so it was pointing to the wrong source of Java files.
My files incorrect entry:
I changed it to the correct entry:
Now it is working.