Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Oracle OCI driver: Garbage after a failed getConnection()

Oracle OCI driver: Garbage after a failed getConnection()

From: Ole Streicher <ole-usenet-04_at_gmx.net>
Date: 14 Jun 2001 17:26:26 +0200
Message-ID: <qf1yon13rx.fsf@ebp00439.ebp.de>

Hi!

I have some trouble to get a server program using the Oracle OCI driver running. When I execute the following program:

------------------------------8<-----------------------------------------
import java.sql.*;

class OraTest {
  public static void main(String args[]) {     try {
      DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
} catch (SQLException e) {

      e.printStackTrace(); 
      System.exit(1);

}

    Connection conn = null;

    while (conn == null) {

      try {
        conn = DriverManager.getConnection("jdbc:oracle:oci8:@qmrs", 
                                           "icke", "falsch");
        Thread.sleep(1000);
      } catch (Exception e) { 
        e.printStackTrace();  
      }

}

 System.out.println("Connection " + conn);   }
}
------------------------------8<-----------------------------------------

with a valid connection string, I get the (correct) exceptions

java.sql.SQLException: ORA-01017: invalid username/password; logon denied

        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114) [...]

However, the TCP conncection to the data base remains after every try, and also the Oracle processes which were created remain. After a short time, the process table of the data base server is full, and I have to kill the process above.

Is this a known bug?

Is there any good workaround for that? How do I need to handle login failures in a server so that failed logins dont produce garbage?

I use Oracle 8.1.6 on Linux. With the "thin" driver, everything looks OK.

Any suggestions?

Ole Received on Thu Jun 14 2001 - 10:26:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US