Home » Developer & Programmer » JDeveloper, Java & XML » network adapter could not establish the connection
network adapter could not establish the connection [message #92290] Wed, 19 May 2004 10:16 Go to next message
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: network adapter could not establish the connection [message #92328 is a reply to message #92290] Mon, 07 June 2004 00:41 Go to previous messageGo to next message
Venkat
Messages: 110
Registered: February 2001
Senior Member
reply soon
Re: network adapter could not establish the connection [message #92343 is a reply to message #92328] Wed, 09 June 2004 10:22 Go to previous messageGo to next message
N. Taylor
Messages: 2
Registered: May 2004
Junior Member
I would love to hear your reply. I'm checking back regularly.

nttaylor
Re: network adapter could not establish the connection [message #92385 is a reply to message #92290] Tue, 22 June 2004 13:12 Go to previous messageGo to next message
Himanshu Parida
Messages: 1
Registered: June 2004
Junior Member
This could happen because either the DB server and/or the listener is not running

If you can connect to the database using SQL*Plus, then the database server is running. Use the "lsnrctl" utility to check whether the database listener is running.
Re: network adapter could not establish the connection [message #92399 is a reply to message #92385] Wed, 30 June 2004 06:41 Go to previous messageGo to next message
rajesh
Messages: 173
Registered: November 1998
Senior Member
Started lsnrtcl.

How do I know whether database listener is running?
Re: network adapter could not establish the connection [message #92637 is a reply to message #92399] Tue, 02 November 2004 02:39 Go to previous messageGo to next message
Jayachandran G
Messages: 1
Registered: November 2004
Junior Member
Hi
I'm using Oracle Lite. How to Configure the Lite Driver ? Pls provide the information ...

Thanks
Jayachandran G
Re: network adapter could not establish the connection [message #92656 is a reply to message #92343] Mon, 08 November 2004 19:18 Go to previous messageGo to next message
nethra
Messages: 2
Registered: November 2004
Junior Member
me too. whats the solution?
query: network adapter could not establish the connection [message #92699 is a reply to message #92385] Thu, 02 December 2004 22:59 Go to previous messageGo to next message
shabana
Messages: 1
Registered: December 2004
Junior Member
the lsnrctl utility is running but we still get the error, what to do next????
Re: network adapter could not establish the connection [message #92709 is a reply to message #92385] Fri, 10 December 2004 19:27 Go to previous messageGo to next message
Kamesh
Messages: 5
Registered: August 2002
Junior Member
The third reason could be incorrect instance name in the url.
so find the instance name from the database and specify the correct instance name.
log in as dba and then type the following statement.

select instance_name from v$instance;
Re: query: network adapter could not establish the connection [message #92732 is a reply to message #92699] Sat, 25 December 2004 22:44 Go to previous messageGo to next message
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.
Re: query: network adapter could not establish the connection [message #92745 is a reply to message #92732] Mon, 03 January 2005 14:50 Go to previous messageGo to next message
Edgard Pisani
Messages: 1
Registered: January 2005
Junior Member
Indeed, I had the same problem without realizing that my listenr was not launched.

Many thanx !!!! :))
Re: query: network adapter could not establish the connection [message #92769 is a reply to message #92745] Wed, 12 January 2005 08:32 Go to previous message
Louise
Messages: 1
Registered: January 2005
Junior Member
Sorry, I have the same problem... therefore I can connect from part of my application and the other part return the error: java.sql.SQLException: I/O Exception: Connection reset

Any suggestion?
Previous Topic: Protocol Violation
Next Topic: How to subscribe a java jar file into oracle database
Goto Forum:
  


Current Time: Thu Mar 28 14:55:49 CDT 2024