title: how to resolve Got minus one from a read call in oracle 11g jdbc 7/14 jdk 1.7?
body: <p>I am using netbeans and jdk 7 updt 9 with 1.7 and following is my code.</p>
  <pre><code>public class jd {
      public static void main(String[] args) throws ClassNotFoundException, SQLException 
  {
          
          Class.forName(&quot;oracle.jdbc.driver.OracleDriver&quot;);
          Connection con=DriverManager.getConnection(&quot;jdbc:oracle:thin:@localhost:1158:ORCL&quot;,&quot;system&quot;, &quot;system&quot;);
          System.out.println(&quot;Connection successful&quot;);
         // Statement s = con.createStatement();
         
      }
      
  }
  </code></pre>
  <p>output is</p>
  <pre><code> run:
      Exception in thread &quot;main&quot; java.sql.SQLRecoverableException: IO Error: Got minus one from a read call
          at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:673)
          at oracle.jdbc.driver.PhysicalConnection.&lt;init&gt;(PhysicalConnection.java:715)
          at oracle.jdbc.driver.T4CConnection.&lt;init&gt;(T4CConnection.java:385)
          at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
          at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:564)
          at java.sql.DriverManager.getConnection(DriverManager.java:571)
          at java.sql.DriverManager.getConnection(DriverManager.java:215)
          at jd.main(jd.java:22)
      Caused by: oracle.net.ns.NetException: Got minus one from a read call
          at oracle.net.ns.Packet.receive(Packet.java:314)
          at oracle.net.ns.NSProtocolStream.negotiateConnection(NSProtocolStream.java:153)
          at oracle.net.ns.NSProtocol.connect(NSProtocol.java:263)
          at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1360)
          at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:486)
          ... 7 more
  
  Java Result: 1
  BUILD SUCCESSFUL (total time: 0 seconds)
  </code></pre>