Re-connection to ORACLE db after the ORACLE server was down [message #91415] |
Wed, 21 August 2002 23:45 |
Greg
Messages: 35 Registered: July 2000
|
Member |
|
|
Hi all,
I have a problem i've been trying 2 solve for several weeks now.
I'm running a Java Class which connects to an ORACLE database located
on the server 'server'.
Everything is working fine.
the problem is that if when the class is first run and the server is
down (not started), I get an SQLException:
"java.sql.SQLException: Exception d'E/S: The Network Adapter could not establish the connection
java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties, java.lang.ClassLoader) (DriverManager.java:473)
java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.lang.String, java.lang.String) (DriverManager.java:137)"
so the class retries after a certain period,
say 5 minutes (the server is up and running at that time),
i still get the same exception whereas it should now connect correctly.
all the parameters are correct since the connections are established in all cases except this one.
any help or suggestion would be appreciated,
thanx,
greg
|
|
|
|
|
Re: Re-connection to ORACLE db after the ORACLE server was down [message #91425 is a reply to message #91415] |
Fri, 23 August 2002 02:56 |
Greg
Messages: 35 Registered: July 2000
|
Member |
|
|
well, it seems it's a problem of the jdbc driver, i used the jdbc-odbc bridge driver and it worked well.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//...
cnn = DriverManager.getConnection("jdbc:odbc:TEST_dsn", "usr", "pwd");
but now, i already tried to use it before but i had other problems with it...
|
|
|