network adapter could not establish the connection [message #92290] |
Wed, 19 May 2004 10:16 |
N. Taylor
Messages: 2 Registered: May 2004
|
Junior Member |
|
|
Dear anyone,
I am trying to establish a connection to an Oracle DB via JDBC and get an SQLException when I try to connect, which I have reproduced at the bottom of this post. I am running Win2K pro.
I have looked all over the net about this problem and found a lot of posts about it, but so far none of them work for me. Here are some things I do know:
1. The exact same code works fine when I try to connect from home. I only get the error when I try to connect from work. (by the way, I'm running Win2K pro from both home and work)
2. I have added entries for the machine with the Oracle DB on it to my local 'hosts' file and to my 'java.policy' file
3. When at work, I get a similar error when I try to connect to a Sybase DB, which I also do not get when I try to connect from home. Could it be some kind of firewall issue? I have no problem ssh-ing to machines on the same remote network from work, running scp, etc.
grateful for any help,
N. Taylor
** here's the error **
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:418)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:521)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:325)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at MyOracleConnection.main(MyOracleConnection.java:15)
|
|
|
|
|
|
|
|
|
|
|
Re: query: network adapter could not establish the connection [message #92732 is a reply to message #92699] |
Sat, 25 December 2004 22:44 |
Riaz
Messages: 112 Registered: February 2002
|
Senior Member |
|
|
make sure that jdbc url u r using is correct.then check for Database lister.to check database lister in dos environment.use this command.
prompt>telnet ipaddress(of database where it is running) portno ,press enter
after that if use press any key and cursor is responding,then lister is running.other wise ask the DBA to start dataBase lister.
|
|
|
|
|