This is a really simple question, and it\'s probably a setting somewhere I don\'t know about, but Google is being particularly unhelpful for this question, giving results ab
My guess the compiler is complaining about an invalid annotation. I've noticed that Eclipse doesnt show all errors, like a comma at the end of an array in a annotation. But the standard javac
does.
I had the same issue with maven. It happens that my problem was, maven was generating the folders with differenc case names. I was expecting a .service.MyFile but in the target folder it was Service/MyFile and java is a case sensitive. It took me a few hours to find out, recommend you to check it out.
Perhaps you should check your IDE case sensitive properties. I had the same problem, and solved it by making Idea case-sensitive (for my filesystem is case sensitive): https://confluence.jetbrains.com/display/IDEADEV/Filesystem+Case-Sensitivity+Mismatch
This is a bug in the Maven compiler plugin, related to JDK7 I think. Works fine with JDK6.
Even I am using Java 7, maven 2.2.1 and was getting the same error, I removed <scope>tests</scope>
from my pom and used
mvn clean -DskipTests=true install
to successfully build my projects, without upgrading my maven version.
I had the same problem. The reason was that I had two JAR files were not added through the Maven dependency, so when I ran mvn compile
, the console display the error error:
Symbol cannot be found,Class...".
To fix it:
mvn compile