java.lang.NoSuchMethodError
occur if there is some issue with the jar loaded. I think that on the system that you are trying to run this code on, has CLASSPATH set to some path which is loading the older version of the jar
. Use the following code to find out the paths from where the ClassLoader is resolving the dependencies
public static void main(String[] args) {
URLClassLoader classLoader = (URLClassLoader)Main.class.getClassLoader();
System.out.println(Arrays.toString(classLoader.getURLs()));
}
Put this method in Main class and execute it in the system that is giving this error. It will show you all the paths from where the dependencies have been resolved. Find out if any of the paths have older version of the jar.
Hope this helps your cause.