0 Replies Latest reply: Aug 26, 2008 2:09 AM by 656753 RSS

    Error message while compling the following code.can some body help me?

    656753
      i complied simple java code in this fashion

      import java.io.*;
      import java.sql.*;
      import oracle.jdbc.*;
      import oracle.sql.*;
      import javax.sql.*;

      class JdbcVersion
      {
      public static void main (String args[])
      throws IOException, SQLException
      {
           //Register Oracle's Driver
           DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
           
           //Build the connection string.

           String connString ="jdbc:oracle:thin:@(description=(address_list=" +
      "(address=(protocol=tcp)(port=1521)(host=home-f831b673e0))" +
      "(address=(protocol=tcp)(port=1521)(host=home-f831b673e0)))" +
      "(connect_data=(sid=PLSExtProc))" +
      "(source_route=yes))";


      Connection conn = DriverManager.getConnection(connString, "<username>", "<password>");

      // Create Oracle DatabaseMetaData object
      DatabaseMetaData meta = conn.getMetaData();

      // gets driver info:
      System.out.println("JDBC driver version is " + meta.getDriverVersion());
      }
      }


      while running this code it shows me an error like this
      C:\>java JdbcVersion
      Exception in thread "main" java.sql.SQLException: Io exception: Software caused
      connection abort: recv failed
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
      at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
      at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
      va)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at JdbcVersion.main(JdbcVersion.java:24).

      can any body help me out???