Try this way: remove all .class files under your project directories (and, of course, all subdirectories). Rebuild.
Sometimes mvn clean
(if you are using maven) does not clean .class files manually created by javac
. And those old files contain old signatures, leading to NoSuchMethodError
.