ResultSet data_result = dao.getDetails();
Method resultset_method;
resultset_method = data_result.getClass().getMethod("getInt", Integer.class);
it is giving error:
java.lang.NoSuchMethodException: org.apache.commons.dbcp.DelegatingResultSet.getInt(java.lang.Integer)
The
ResultSet
'sgetInt
method has two overloads, one that takes anint
for the index and one that takes aString
for a column name. You're attempting to retrieve agetInt()
method, which indeed does not exist.You need to supply the types that the method takes - eg, if you were going by name,