How can I avoid ResultSet is closed exception in Java?

前端 未结 10 1023
渐次进展
渐次进展 2020-11-28 09:51

As soon as my code gets to my while(rs.next()) loop it produces the ResultSet is closed exception. What causes this exception and how can I correct

10条回答
  •  醉话见心
    2020-11-28 10:26

    Check whether you have declared the method where this code is executing as static. If it is static there may be some other thread resetting the ResultSet.

提交回复
热议问题