1) Code in PersonDAO
inside if
throws NullPointerException
if (pendingcount == 0) {
PersonBean pbb = null; //assign null reference
pbb.setDate("0"); //setting value to null reference throws NPE
listdateperson.add(pbb);
}
2) Missing to assign object reference
PersonBean pbbb = null;
while (rs.next()) {
PersonBean = new PersonBean(); //how can you assign object reference to class PersonBean?
It must be
pbbb = new PersonBean();
You are using PreparedStatement, then use place holder(?) for passing the parameter to query, this will Prevent SQL injection