Your error checking's not returning any failures. At a basic, you can change this block of code
Code:
try {
while (rs.next()) {
userId = rs.getString("user_id");
fname = rs.getString("first_name");
lname = rs.getString("last_name");
address = rs.getString("add1");
Contacts contact = new Contacts(); //Create Class object
contact.setDetails(userId,fname,lname,address); //Set details into object
contacts.add(contact); //Place object into list
} rs.close();
} catch(SQLException ex) {ex.toString();}
to
Code:
try {
while (rs.next()) {
userId = rs.getString("user_id");
fname = rs.getString("first_name");
lname = rs.getString("last_name");
address = rs.getString("add1");
Contacts contact = new Contacts(); //Create Class object
contact.setDetails(userId,fname,lname,address); //Set details into object
contacts.add(contact); //Place object into list
} rs.close();
} catch(SQLException ex) {
System.err.println("**** sql exception begin ****");
ex.printStackTrace(System.err);
}
Then take a look at wherever your system.err is pointing to.
Bookmarks