Java Reflection – Object is not an instance of declaring class

You’re invoking the method with the class, but you need an instance of it. Try this:

serverMethod.invoke(base.newInstance(), new HashMap<String, String>());

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)