2nd time calling PreparedStatement is not working after closing connection?
PreparedStatement instances are tied to the connection used to prepare them, as far as I'm aware. You can't use the PreparedStatement after closing the connection, even if you open another one later.