Just a stab in the dark, but I think you can only have one resultset open in a connection at a time. I suggest using a connection pool and multiple connections.
I have a question about using two PreparedStatements in the same
connection. When I use the following line, I get an exception
java.sql.SQLException: ResultSet not open. Operation 'next' not
permitted. Verify that autocommit is OFF.
String strQuery = ...
PreparedStatement pstmt = ...
ResultSet rs = pstmt.executeQuery();
Integer key = rs.getInt("LINE_ID");
String strQuery2 = ...
PreparedStatement pstmt2 = ...
ResultSet rs2 = pstmt2.executeQuery();
I tried to set autoCommit to false, but it remains.