title: How can I avoid ResultSet is closed exception in Java?
body: <p>As soon as my code gets to my <code>while(rs.next())</code> loop it produces the <code>ResultSet</code> is closed exception. What causes this exception and how can I correct for it?</p>
  
  <p><strong>EDIT:</strong> I notice in my code that I am nesting <code>while(rs.next())</code> loop with another <code>(rs2.next())</code>, both result sets coming from the same DB, is this an issue?</p>