Java: NoSuchMethodException when method clearly exists

Solution 1:

Your method is private but getMethod() only returns public method.

You need to use getDeclaredMethod().

Solution 2:

You need the parameter list to be absolutely correct for the method you want for the call to succeed.

I've found that tiny steps are important when doing reflection because the compiler doesn't help. Write a small snippet which actually invokes exactly the method you want to in this particular case, and then when that works, generalize it into the framework here. I would focus on the parameters passed.

Solution 3:

The Javadoc for getMethod isn't explicit, but it looks like it might throw a NoSuchMethodException for methods that aren't public, and your method is private.