Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Oracle OCI driver: Garbage after a failed getConnection()
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(); }
------------------------------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
![]() |
![]() |