Home » Developer & Programmer » JDeveloper, Java & XML » Re-connection to ORACLE db after the ORACLE server was down
Re-connection to ORACLE db after the ORACLE server was down [message #91415] Wed, 21 August 2002 23:45 Go to next message
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 #91419 is a reply to message #91415] Thu, 22 August 2002 04:46 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
the SERVER  is up. okie.
did you check the whether LISTENER is up??

Re: Re-connection to ORACLE db after the ORACLE server was down [message #91421 is a reply to message #91419] Thu, 22 August 2002 04:54 Go to previous messageGo to next message
Greg
Messages: 35
Registered: July 2000
Member
What do you mean by 'LISTENER'? and is it on the server or the machine where the class is running?
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 Go to previous message
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...
Previous Topic: limit # of results per page
Next Topic: Re: java.sql.SQLException: Io exception: End of TNS data channel
Goto Forum:
  


Current Time: Fri Mar 29 01:40:22 CDT 2024