So I'm writing a quick app to compare to large data sets. As they are large I put them into an H2 database figuring this would be an easy and quick solution. Headaches later, I've run into a problem where I can query one table but using that the ResultSet to query another ResultSet leads me to the following error:
org.h2.jdbc.JdbcSQLException: The object is already closed
This occurs in the outer while loop of the code below.
Is there something I'm missing about
JDBC that is causing it to close one ResultSet as soon I create another ResultSet?