title: Oracle JDBC intermittent Connection Issue
body: <p>I am experiencing a very strange problem
  This is a very simple use of JDBC connecting to an Oracle database</p>
  
  <pre><code>OS: Ubuntu
  Java Version:  1.5.0_16-b02
                 1.6.0_17-b04
  Database: Oracle 11g Release 11.1.0.6.0
  </code></pre>
  
  <p>When I make use of the jar file
  <code>OJDBC14.jar</code> it connects to the database everytime
  When I make use of the jar file
  <code>OJDBC5.jar</code> it connects some times and other times it throws an error ( shown below)
  If I recompile with Java 6 and use
  <code>OJDBC6.jar</code> I get the same results as <code>OJDBC5.jar</code></p>
  
  <p>I need specific features in JODB5.jar that are not available in OJDBC14.jar</p>
  
  <p>Any ideas</p>
  
  <p><strong>Error</strong></p>
  
  <pre><code>&gt; Connecting to oracle
      java.sql.SQLException: Io exception: Connection reset
      at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
      at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:494)
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:411)
      at oracle.jdbc.driver.PhysicalConnection.&lt;init&gt;(PhysicalConnection.java:490)
      at oracle.jdbc.driver.T4CConnection.&lt;init&gt;(T4CConnection.java:202)
      at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:474)
      at java.sql.DriverManager.getConnection(DriverManager.java:525)
      at java.sql.DriverManager.getConnection(DriverManager.java:171)
      at TestConnect.main(TestConnect.java:13)
  </code></pre>
  
  <p><strong>Code</strong></p>
  
  <p>Below is the code I am using</p>
  
  <pre><code>import java.io.*;
  import java.sql.*;
  public class TestConnect {
      public static void main(String[] args) {
          try {
              System.out.println("Connecting to oracle"); 
              Connection con=null;
              Class.forName("oracle.jdbc.driver.OracleDriver");
              con=DriverManager.getConnection(
                 "jdbc:oracle:thin:@172.16.48.100:1535:sample",
                 "JOHN",
                 "90009000");
              System.out.println("Connected to oracle"); 
              con.close();
              System.out.println("Goodbye");
          } catch(Exception e) { e.printStackTrace(); }
      }
  }
  </code></pre>