General
cancel
Showing results for 
Search instead for 
Did you mean: 

java.sql.SQLException: Io exception: The Network Adapter could not establish the connection

Ajith_1
Occasional Visitor

java.sql.SQLException: Io exception: The Network Adapter could not establish the connection

I downloaded the oracle9i (trial version) from the oracle website. And after a little struggle, I got oracle running and I was able to query through sqlPlus and JDBC program.
For some reason, oracle did not # LISTENER.ORA Network Configuration File: /var/ORACLE/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ns.igridcanada.com)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /var/ORACLE)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = igcdb2)
(ORACLE_HOME = /var/ORACLE)
(SID_NAME = igcdb2)
)
)
work suddenly, so i re-installed it and again it works. But now my JDBC is not able to connect to the database.
I am able to connect to the database using sqlplus username developer1 and password developer1. but when i try the following using java:
connection = DriverManager.getConnection
("jdbc:oracle:thin:@marcanthony:1521:dev1","developer1","developer1");

and compile it, i get the following error:
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection

There was an exact situation resolved in this forum fixing the litener.ora file I suppose.
But I checked my listener.ora file it looks fine with correct entry for my
DB server on which I am tryng to access the DB using JDBC.

Here is my Configuration:

OS: RH Linux 7.2
DB: ORACLE 9i
HOST: ns.igridcanada.com
( I tried the IP:142.179.66.247 it self does not sem to work
)

any help is appreciated.

-- ajith

Here is my Listener.ora
sipmple things should be simple complex things should be possible - Einestein