La documentazione javadoc di java.sql.Statement dice proprio all'inizio:
---
By default, only one ResultSet object per Statement object can be open at the same time. Therefore, if the reading of one ResultSet object is interleaved with the reading of another, each must have been generated by different Statement objects. All execution methods in the Statement interface implicitly close a statment's current ResultSet object if an open one exists.
---
Cosa ti fa pensare?
Che tu hai usato un unico Statement (quel 'stm') per creare 2 ResultSet che usi in modo "intervallato".
Questo significa che per risolvere il mio problema è sufficiente creare un nuovo oggetto Statement (uguale al precedente), e quindi assegnare a rs1 questo?
Grazie!!![]()