title: Use of 'dual' table using jdbc
body: <p>I want to test the connection so I am using the query: 'SELECT 1 FROM dual' to compare the value returned.</p>
  
  <pre><code>ResultSet rs = stmt.executeQuery("SELECT 1 FROM dual");
  </code></pre>
  
  <p>on doing rs.next() the exception thrown is: </p>
  
  <pre><code>java.sql.SQLException: Closed Connection: next
  </code></pre>
  
  <p>How can I get rs.getString(1) as 1 by executing the query?</p>