Note that there are some explanatory texts on larger screens.

plurals
  1. POjdbc connection error with oracle
    primarykey
    data
    text
    <p>I am unable to connect to oracle database using jdbc. </p> <p>Error: Could not connect to database at jdbc:oracle:thin:@localhost.localdomain:1521:orcl (Username: system, Password: tiger)</p> <p>However, I can connect it using sqlplus command.</p> <p>Here is the log:</p> <pre><code>java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode) Version = Sun GlassFish Enterprise Server v2.1 Testing Database Connection ... -- Failure! java.sql.SQLException: Io exception: The Network Adapter could not establish the connection </code></pre> <p>Here is the listener.ora:</p> <pre><code> LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521)) ) ) ADR_BASE_LISTENER = /home/oracle/app/oracle </code></pre> <p>Output of lsnrctl:</p> <pre><code>Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=::1)(PORT=1521))) Services Summary... Service "orcl" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... Service "orclXDB" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... The command completed successfully </code></pre> <p>Contents of tnsnames.ora:</p> <pre><code> ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) </code></pre> <p>I am using Oracle 11g, glassfish server 2.1, Redhat linux enterprise edition 6.</p> <p>Any help would be really appreciated.</p> <p>--Sam</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload