This means that the value object you pass to invoke is not an instance of the class for which method is defined. This is because the first argument to invoke is the object for which you want to make a call, and the subsequent arguments are parameters of the called method. (In this case, it looks like the value should be an instance of com.xxx.Currency - this is certainly not the case, because it is a List .)
Since you are calling a non-static method (and are going to create problems with creating a new instance), for the reflective equivalent of obj.setCurrencyCode(value) at the end of your try block, you will need to call
method.invoke(obj, value)
instead of your current single call to one-arg.
source share