Network adapter could not establish conn but something Strange
Hi All,
I use VPN to connect DB and UI. To avoid use of VPN, orgnization decided to use site-to-site. So they made some changes on my PC. So last day I was able to connect to Development and QA database.
But since morning I was not able to connect DB through either site-to-site or VPN.
What will be the possible issue here?
Your help appreciated.
Thank you
Sachin Mali
Thanks Pravin.
I use Oracle SQL Developer to connect DB.
using site-to-site last day - able to connect to Dev and QA DB
using site-to-site today - not able to connect to Dev and QA DB
using VPN last day - able to connect to Dev and QA DB
using VPN today - not able to connect to Dev and QA DB
When I access Dev or QA application (from UI), its working fine. So there is no issue with listner.
If need any more details please let me know
Similar Messages
-
Probelm the network adapter could not establish connection
Hi Everyone ,
i installed the Sqldevelopr version 2.1.0.63 in windows vista , but when i start new connection its shows me error (network adapter could not establish connection)
but it's work when i used sql plus , i tried many times but it shows me same error what should i do?.
detailes for connection as bellows
connection name=orcl
username=scott
sid=orcl
port=1521
Best Regards
anwarYou should post your question in [SQL Developer|http://forums.oracle.com/forums/forum.jspa?forumID=260] forum
Edited by: Oleg Gorskin on 28.12.2009 6:21 -
Hello all!
First of all, I want to say I read all the answers to this problem that were posted in the past in this forum.
I try to connect from the intranet to an Oracle database, named bc01. The string I use is "jdbc:oracle:thin:@192.168.199.11:1521:bc01". On the 192.168.199.11 machine the listener and oracleservice services are started. The bc01 is correctly added to tnsnames.ora. If I issue a tnsping80 192.168.199.11 from the console it works. However, if I issue the same command from my workstation, it doesn't work (says No listener). So what am I missing here?
Any help is much appreciated !
Thank you very much!Faizan,
Normally this error is reported when the database is either not available or the URL is invalid. Please check the URL whether you have a valid DB connection there.
Also I see the getConnection missing e,g.
Connection conn = ds.getConnection();
regards
Debu
I am trying to setup DataSource for my application and I am using oracle 8.1.6.3 database. I have following entry in the data-sources.xml file
<data-source
class="oracle.jdbc.pool.OracleDataSource"
name="jdbc/pool/OracleDS"
location="jdbc/ConnectionDS"
pooled-location="jdbc/pool/OracleDS"
url="jdbc:oracle:thin:@machine:1521:development"
username="user"
password="password"
min-connections="3"
max-connections="50"
wait-timeout="10"
inactivity-timeout="30"
/>
In my JSP code I am doing following to access the database
ResultSet sqlResultSet = null;
PreparedStatement stm = null;
InitialContext ic = new InitialContext();
DataSource ds = (DataSource)ic.lookup("jdbc/OracleDS");
stm = conn.prepareStatement(updtUser);
I got following exception when I ran teh code
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
Thanks for help
Faizan -
Network adapter could not establish a connect from external server
hi,
I've set up a jdbc thin driver properly using
the following input:
"jdbc:oracle:thin:@ipaddress:1521:DBname",
"username", "password"
When outside users try to connect externally (outside the network) there is a different ipaddress. Although they are able to ping,
telnet, run jsp etc... using the external address, they get the following error when they try the thin driver connection:
i/o exception: network adapter could not establish a connection
They change the ipaddress in the connection string to match the external ip. We are using oracle 8i, JRun on Linux. I have a feeling it has something to do with the tnsnames.ora file but I can't be sure.
Any ideas?
Thanks in advance!this is expected behavior ...
the jdbc thin driver requires the use of an ip address that the calling program has acces to ...
internally you have one ip address exposed.
apparently you have another ip address set up for the external customer.
fyi
jdbc thin driver don'ts use the tnsnames.ora file -- they use "host:port:sid" because they are required to be platform independent and not access local datafiles or environment variables on the execution platform.
jdbc oci drivers do use tnsnames.ora which provides the host:port:sid info in their entries. -
Io exception: The Network Adapter could not establish the connection
Hi All,
I run tomcat and connect to Oracle fine, both on the same machine.
I also run some batch processes daily and they often run without problems. The batch processes lots of selects and updates/inserts onto Oracle.
These tend to work fine, but sometimes when they run I get
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
So a batch process will be running doing lots of selects and updates then it just decides it had enough and throws this error each time it tries to connect. Meanwhile tomcat continues to run fine through the same TNS listener, but subsequent batch jobs fail to connect.I normally have to restart the TNS Listener.
I connect through the same class whether connecting through Tomcat or from the batch process with this:
public static Connection getConnection(String caller) throws SQLException{
try{
Connection con;
if (standalone){
try{Class.forName(driver);}catch(ClassNotFoundException e){}
con=DriverManager.getConnection(url,user,password);
return con;
}else{
if (ds==null)initialiseContext();
con=ds.getConnection();
return con;
}catch(SQLException e){
ds=null;
logger.debug("Problem in DBAccess.getConnection()...");
logger.debug(e.getMessage());
e.printStackTrace();
throw e;
I specifiy params such as MaxIdle with Tomcat using the xml config but not when its standalone - could this be affecting it?
Any idea?
Thanks.lovingbarcelona wrote:
* Yep I get the same on the dev box.
* I am definitely closing all the connections, I keep a close watch on that.
Oracle should be able to handle lots of connections no problem, I agree, and it is through tomcat.
Yet the exception that you get says that it isn't. Oracle, for example, on a single box shouldn't be able to handle 100,000 simultaneous connections.
I would be very surprised if it couldn't handle 1,000. And if there was an issue at that point it would be a resource bound issue, like CPU (on the single box) rather than connections.
You suggested licensing issues?I believe at one time, not necessarily now, the Oracle server would be sold such that it limited the number of simultenous connections. This could have been a relatively low number. There are quite a few assumptions in that - the major one would be it is based on my faulty memory and second would be that it was years ago.
By the way you are not running this on a unix variant system without redoing the kernel limits to set up for a server system right? -
Network adapter could not establish the connection
Hi,
Iam new to using Oracle please help me in this problem. Iam trying to connect oracle8i in my home pc(win 98) in java.. I have said..
String url="jdbc:oracle:thin:@testhost:1521:sid";
DriverManager.getConnection(url,"scott","tiger");
Actually i have added the service name using Oracle Net 8 Assistant ... it asked me service name so i gaved "fobjects". then host and port number then i gave "testhost" and port number as 1521. then i tried to use the test service but i couldnt get it... it gaved me error called " ORA12545- Connect failed because target host or obejct doe not exist ..Even then i pressed finished button to accomplish the thing...ans when i executed the java program with the above service name setup it said SO Excpetion : Network adapter could not establish the connection.
Well What the wrong i have done, help me...
Regards
Lensi.hi,
I think you have to register the driver first. pls try the following program...
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
* This class tests the environment to check if JDBC is configured and
* connection to database is possible thru JDBC. Uses THIN driver to connect.
public class JDBCCheck {
public JDBCCheck() { }
private Connection conn = null;
private final int NO_DRIVER = 1;
private final int INVALID_URL = 17002;
private final int INVALID_CREDENTIALS = 1017;
private final int NULL_URL = 2;
private final int DATABASE_DOWN = 1034;
public static void main(String[] args) {
JDBCCheck check = new JDBCCheck();
check.dbconnect();
public void dbconnect() {
if(loadDriver())
if(connect())
doSomething();
public boolean loadDriver() {
boolean loadeddriver = false;
String jdbcDriver = System.getProperty("jdbc.driver.class");
// Use Oracle driver if nothing is set
if(jdbcDriver == null) jdbcDriver = "oracle.jdbc.driver.OracleDriver";
log("Loading JDBC Driver : class="+jdbcDriver+" ...");
// try to load driver
try {
Class.forName(jdbcDriver);
log("Loaded JDBC Driver ");
loadeddriver = true;
} catch (ClassNotFoundException noclassEx) {
error(NO_DRIVER,noclassEx);
return loadeddriver;
public boolean connect() {
boolean connected = false;
String jdbcURL = System.getProperty("jdbc.url");
String username = System.getProperty("jdbc.username");
String password = System.getProperty("jdbc.password");
if(username == null || password== null) {
username = "scott";
password = "tiger";
if(jdbcURL == null) error(NULL_URL,new Exception(" jdbc.url cannot be null "));
log("Connecting with URL="+jdbcURL+" as "+username+"/"+password);
try {
conn = DriverManager.getConnection(jdbcURL,username,password);
log("Connected to Database");
connected = true;
} catch (SQLException sqlEx) {
error(sqlEx.getErrorCode(),sqlEx);
return connected;
public void doSomething() {
Statement stmt = null;
ResultSet rset = null;
try {
stmt = conn.createStatement();
log("Created Statement object");
rset = stmt.executeQuery(" SELECT 'PASSED' FROM Dual ");
log("Retrieved ResultSet object");
if(rset.next())
log("Connection :"+rset.getString(1));
} catch (SQLException sqlEx) {
} finally {
try {
log("Closing Statment & ResultSet Objects");
if (rset != null) rset.close();
if (stmt != null) stmt.close();
if (conn != null) {
log("Disconnecting...");
conn.close();
log("Disconnected from Database");
} catch (Exception e) { }
public void log(String logMsg) {
System.out.println("Log: "+logMsg);
public void error(int errcode, Exception ex) {
String jversion = System.getProperty("java.version").substring(0,3);
String os = System.getProperty("os.name");
String excp = ex.toString();
// Driver not found in classpath
if(errcode == NO_DRIVER) {
String jarname = "classes12.jar";
String nlsjarname = "nls_charset12.jar";
if(jversion.equals("1.1")) {
jarname = "classes111.jar";
nlsjarname = "nls_charset11.jar";
else if(jversion.equals("1.4"))
jarname = "ojdbc14.jar";
System.out.println(" Error: JDBC Drivers not present in CLASSPATH ");
System.out.println("\n Your CLASSPATH is :"+System.getProperty("java.class.path"));
System.out.println("\n To add Oracle JDBC Drivers to CLASSPATH ");
// Windows
if(os.indexOf("Windows") != -1) {
System.out.println(" >set CLASSPATH=<path-to-"+jarname+">;<path-to-"+
nlsjarname+">;%CLASSPATH%;");
} else {
System.out.println(" $CLASSPATH=<path-to-"+jarname+">:<path-to-"+
nlsjarname+">:$CLASSPATH:");
System.out.println(" $export CLASSPATH");
System.out.println(" Oracle JDBC Drivers can be found in "+
"<ORACLE_HOME>/jdbc/lib directory or "+
"downloaded from http://otn.oracle.com/software/");
} else if (errcode == NULL_URL) {
System.out.println("Error: jdbc.url was not supplied");
System.out.println("Usage: java -Djdbc.url=jdbc:oracle:thin:@<hostname>:<port>:<db_sid> JDBCCheck ");
} else if (errcode == INVALID_URL) {
// Check if Invalid Database SID
if( excp.indexOf("ERR=12505") != -1)
System.out.println("Error: Invalid Database SID was specified in jdbc.url ");
System.out.println("Error: Invalid JDBC URL or DB Listener is down, refer to http://myjdbc.tripod.com/basic/jdbcurl.html ");
} else if (errcode == INVALID_CREDENTIALS) {
System.out.println("Error: Invalid username/password was specified ");
System.out.println("Try connecting to the database thru SQL Plus using the same username/password");
} else if (errcode == DATABASE_DOWN ) {
System.out.println("Error: The Database you are tying to Connect is down ");
System.out.println(" Start the Database and then try to connect ");
} else {
System.out.println("Error code not handled : "+errcode);
System.out.println("\nException Message :"+excp);
System.exit(0);
while running thig pgm, you should pass the driver URL..
java -Djdbc.url=jdbc:oracle:thin:@<hostname>:<port>:<db_sid> JDBCCheck -
Jdbc. The Network Adapter could not establish the connection. Help Please!!
I've found several responses over this issue, but none works for me.
I'm trying to setup a simple jdbc connection from a simple program.
Platform:
Fedora Core 4 (FC4) on AMD 64 bits
Java 1.4.2_04 (64 bits)
ORacle 10g or Oracle 9.2.0.4 (none works);
Tips:
- I can't connect to a remote server, nor to a local server
- I can connect using SQLplus
- TNSPing works fine
- Listener it's up
- my connection string is jdbc:oracle:thin:user/name@host:port:sid
- Also try jdbc:oracle:thin:user/name@//host:port/sid
- I'v tryied with classes12.jar, odbj14.jar
- my hostname it's ok.
I've monitored ip traffic on remote computer. While using TNSPING I detect activity. While using jdbc, no.
Please, any idea??Thanks for your reply.
To your questions:
- I´v tried both IP, host, and even host.domain
- I can connect from remote workstation using toad, and from local using sqlplus.
- I can´t connect via jdbc.
Folowing:
A) my sample code
B) the stack trace
C) the listener status (from my 9i server. Also tryied another servr with 10g)
when I call this program, I´ve tried severl connection strings:
jdbc:oracle:thin:user/pass@sdd51:1521:ebf
jdbc:oracle:thin:user/pass@:sdd51.sdd.com.ar:1521:ebf
jdbc:oracle:thin:user/pass@:10.10.10.51:1521:ebf
also try the other sintax:
jdbc:oracle:thin:user/pass@//sdd51:1521/ebf
In the classpath, I´tryied:
clasess12.jar
ojdbc14.jar
nls_charset12.jar
thanks
A)=================================================
// Import the JDBC classes
import java.sql.*;
import oracle.jdbc.pool.OracleDataSource;
import java.io.*;
import java.util.*;
public class test
// The query we will execute
static final String query = "select 'Hello JDBC: ' || sysdate from dual";
// The connection to the database
static Connection conn;
// Create the User Interface
static public void main (String args[])
try {
String connect_string = args[0];
// See if we need to open the connection to the database
if (conn == null)
// Create a OracleDataSource instance and set URL
OracleDataSource ods = new OracleDataSource();
ods.setURL(connect_string);
// Connect to the databse
System.out.println ("Connecting to " + connect_string + "\n");
conn = ods.getConnection ();
System.out.println ("Connected\n");
// Create a statement
Statement stmt = conn.createStatement ();
// Execute the query
System.out.println ("Executing query " + query + "\n");
ResultSet rset = stmt.executeQuery (query);
// Dump the result
while (rset.next ())
System.out.println (rset.getString (1) + "\n");
// We're done
System.out.println ("done.\n");
catch (Exception e)
e.printStackTrace();
// Oops
System.out.println (e.getMessage () + "\n");
B)=================================================
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:212)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:251)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:102)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:85)
at test.main(test.java:66)
C)=================================================
LSNRCTL for Linux: Version 9.2.0.1.0 - Production on 30-JAN-2006 17:39:59
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(PORT=1521))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.1.0 - Production
Start Date 24-JAN-2006 11:16:18
Uptime 6 days 6 hr. 23 min. 40 sec
Trace Level off
Security OFF
SNMP OFF
Listener Log File /opt/oracle/product/9.2.0/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sdd51.sdd.com.ar)(PORT=1521)))
Services Summary...
Service "ebf" has 1 instance(s).
Instance "ebf", status READY, has 1 handler(s) for this service...
The command completed successfully -
Top Link error 17002 The Network Adapter could not establish the connection
I have installed an application developped in an another environnement.
I have created the database schema in my own database.
I have created a database connection to this schema.
I have reconciled the schema using this connection (so the database and the connection are available and correct from jdeveloper)
I have updated the Mapping to use the new connection and new generated the mapping status report without any errors
and i still have this error ! The Network Adapter could not establish the connection when i access any jsp document containing data from the database.
I check and recheck everything and all is correct ... sure something is wrong somewhere ... where is the question ...Sorry I think you didn't read the thread or you read it too fast !
I'm not a beginner and I know what the problem is but all the settings are correct in jdev and the database and the listener are running ... i'm able to browse the tables, seeing data reconciling objects with the database connection referenced in the top link descriptor
It seem that top link is using something else and i don't understand from where it took the connection description. -
I got a The Network Adapter could not establish the connection..
hi guys,
i've just downloaded and installed oracle 10g express in my win 7 installation.
i've already created 2 tables and one user and everything seems to be ok.
but.. there's a but!!! i've tried to connect (using driver ojdbc14) from netbeans and i got a "The Network Adapter could not establish the connection" error.
the connection string is:
jdbc:oracle:thin:@pcs:1251:XE
(pcs is my pc's name).
what problem can be?
many thanks ;)lsnrctl service
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 06-ABR-2011 01:53:14
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Conectándose a (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
Resumen de Servicios...
El servicio "CLRExtProc" tiene 1 instancia(s).
La instancia "CLRExtProc", con estado UNKNOWN, tiene 3 manejador(es) para este servicio...
Manejador(es):
"DEDICATED" establecido:0 rechazado:0
LOCAL SERVER
"ORACLE SERVER" establecidos:0 rechazados:0 actuales:0 máximo:25 estado:ready
CLRExtProc
(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\NTN_F94_50C6352F.ORA))
"ORACLE SERVER" establecidos:0 rechazados:0 actuales:0 máximo:25 estado:ready
CLRExtProc
(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\NTN_F94_50C6352F.ORA))
El servicio "PLSExtProc" tiene 1 instancia(s).
La instancia "PLSExtProc", con estado UNKNOWN, tiene 1 manejador(es) para este servicio...
Manejador(es):
"DEDICATED" establecido:0 rechazado:0
LOCAL SERVER
El servicio "XEXDB" tiene 1 instancia(s).
La instancia "xe", con estado READY, tiene 1 manejador(es) para este servicio...
Manejador(es):
"D000" establecidos:0 rechazados:0 actuales:0 máximo:1002 estado:ready
DISPATCHER <machine: PCS, pid: 3440>
(ADDRESS=(PROTOCOL=tcp)(HOST=pcs)(PORT=49160))
El servicio "XE_XPT" tiene 1 instancia(s).
La instancia "xe", con estado READY, tiene 1 manejador(es) para este servicio...
Manejador(es):
"DEDICATED" establecido:5 rechazado:0 estado:ready
LOCAL SERVER
El servicio "xe" tiene 1 instancia(s).
La instancia "xe", con estado READY, tiene 1 manejador(es) para este servicio...
Manejador(es):
"DEDICATED" establecido:5 rechazado:0 estado:ready
LOCAL SERVER
El comando ha terminado correctamente
lsnrctl status
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 06-ABR-2011 01:53:03
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Conectándose a (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
ESTADO del LISTENER
Alias LISTENER
Versión TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Fecha de Inicio 06-ABR-2011 00:13:13
Tiempo Actividad 0 días 1 hr. 39 min. 51 seg.
Nivel de Rastreo off
Seguridad ON: Local OS Authentication
SNMP OFF
Servicio por Defecto XE
Parámetros del Listener C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\listener.ora
Log del Listener C:\oraclexe\app\oracle\product\10.2.0\server\network\log\listener.log
Recibiendo Resumen de Puntos Finales...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pcs)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Resumen de Servicios...
El servicio "CLRExtProc" tiene 1 instancia(s).
La instancia "CLRExtProc", con estado UNKNOWN, tiene 3 manejador(es) para este servicio...
El servicio "PLSExtProc" tiene 1 instancia(s).
La instancia "PLSExtProc", con estado UNKNOWN, tiene 1 manejador(es) para este servicio...
El servicio "XEXDB" tiene 1 instancia(s).
La instancia "xe", con estado READY, tiene 1 manejador(es) para este servicio...
El servicio "XE_XPT" tiene 1 instancia(s).
La instancia "xe", con estado READY, tiene 1 manejador(es) para este servicio...
El servicio "xe" tiene 1 instancia(s).
La instancia "xe", con estado READY, tiene 1 manejador(es) para este servicio...
El comando ha terminado correctamente -
Failure-Io Exception:The network adapter could not establish the connection
Hi,
I am new to sql developer and need help regarding establishing connection in my PC.
I gave the following details for establishing connection.
Connection Name: DB
Username: myDB
passwd: xxxxx
Role: Default
Connection Type: Basic
Host Name: localhost
Port: 1521
SID: xe
When I tested the connection the following error occured:
Failure -Io Exception: The network adapter could not establish the connection
Please help me out.
Thanks in advance.Some information showing:
How to check if there is something listening on a machine/port (there are also port scanners like nmap)
first a success: ctrl - ] typed in by me.
$ telnet localhost 1521
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
^]
telnet> quit
Connection closed.
then a fail:
$ telnet localhost 1522
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
$
Oracle also has tools to get the status of the 'listener' which is listening on the port, including database names for example 'lsnrctl stat' but it may have too many dependencies and privileges required to go into here.
If you do not have XE, you can install it with very few restrictions.
-Turloch -
Failure -lo exception: The Network Adapter could not establish the connecti
I get the following error when I attempt to connect:
Failure -lo exception: The Network Adapter could not establish the connection
I'm running 64-bit Windows XP Pro. Is that possibly an issue? I can ping the server. I am going to go now and install Oracle client software, to see whether I can tnsping and then connect from that.
The remote listener is up and running. I did check that.
What else might be the problem?Kris,
I don't mind having to re-key connections between versions of Raptor, but if Raptor is going to save a connection that worked when I entered it, I expect that connection to work when I restart Raptor.
If you can't save a connection with just the TNS Alias, at least save it as something that works - convert it to the basic format.
Having said that - I would certainly prefer the connection to be saved as the TNS Alias if it could be. We have in the past had cases where we have modified the SID or Listener Port behind a TNS Alias to reduce downtimes during upgrades. With a centralised TNS Names file (which we have), there is only one place to update - if we are saving the full details behind the connection on every developer's PC, there is then a lot of additional places where the details need to be changed. -
JDeveloper Oracle XE The Network Adapter could not establish the connectio
I installed JDeveloper 10.1.2 and oracle express on Fedora.
Now I cannot create a database connection from jdeveloper using the connection navigator
The hostname, port etc is correct.
Sqlplus and everything else regarding the database on the command line works fine.
Did I miss something ?
Maybe an environment setting ?
I did the following installation (all on the same host):
Java runtime
JDeveloper
XE Database
Testing a connection I used the Oracele Database Express Edition 2 Day PLus Java Developer Guide.
Is this documentation complete ?
Can someone also explain to me what the error message
Io exception: The Network Adapter could not establish the connection EXACTLY means ??
Where does it go wrong ?
Is there a checklist for thsi kind of thin-java connection problems ?Here some extra info, as I just said I did a default installation.
The listener is up on port 1521, see ouput:
LSNRCTL for Linux: Version 10.2.0.1.0 - Beta on 01-FEB-2006 15:21:01
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux900)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Beta
Start Date 01-FEB-2006 15:01:51
Uptime 0 days 0 hr. 19 min. 10 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/ne twork/admin/listener.ora
Listener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/ne twork/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linux900)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linux900)(PORT=8080))(Presentation=H TTP)(Session=RAW))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
Service "XE_XPT" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
The command completed successfully
Also tnsping works fine:
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 01-FEB-2006 15:29:32
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = linux900)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (20 msec)
So still I dont known what is going wrong here, the following properties are used by this connection:
Type: Oracle (JDBC)
Driver: oracle.jdbc.driver.OracleDriver
User: hr
URL: jdbc:oracle:thin:@linux900:1521:XE
Is the driver used by JDeveloper correct ?
There is a note on XE that the use of oracle.jdbc.driver.* classes is deprecated but still supported. -
"The Network Adapter could not establish the connection" error
I'm intermittently able to connect into my development database from my PC. When I'm not able to connect in, I'm getting a message of "The Network Adapter could not establish the connection" regardless of the client I'm connecting with. This database is located on a server and is Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production. I have a local install of WebLogic Server that has generated the error message when attempting to start. I have also received the message in SQL Developer and SQL Plus.
As I stated in my first sentence, the issue is intermittent this morning - sometimes I can connect and sometimes I can't...
I've been working successfully in this database for months now without this issue, so I'm guessing that the database itself is having issues, but I'm not a DBA...just a measly developer trying to use the database ;)
Are there good questions for me to ask of my DBA or ways to discover what could be causing the issue? Or, is there something I can do on my machine to get around this?!. Suggest contacting your DBAs first, but Id suggest seeing if the connection is up.
when you get it, check the tns connection. open a dos window
firstly tnsping the database name
tnsping <SID of database from your tnsnames.ora>
then try ping the machine where that SID is
then try telnet to the port of the database thats in your tnsnames.ora
telnet <host> <port>
if you get a blank screen then you know at least the listener is up and running on that machine. CTRL + [ will back you out of the telnet session. -
SQL error: Io exception: The Network Adapter could not establish the connec
Hi,
I am sure this question has been asked a million times and maybe i haven't searched the forum enough.
But here's the situation. I haven't used oracle too much. So I am not too familiar with data-source and what not..
I downloaded the latest version of oc4j(standalone) a few days back. I am trying to get the Oc4j j2eehome/demo/ormap to work .
I deployed the application manually by editing server.xml and http-web-site.xml files...
But i get this error
SQL error: Io exception: The Network Adapter could not establish the connection
I have no clue what that is..
I know its got to do with the bean not connecting to the Database. Do i need to download the oracle database server too.. The documentation says something about the cloudscape database.. Well basically i am lost..
Any information will be very helpful.
regards
-amitHi Amit --
This exception means that the container can't connect to the database instance to which it has been directed to use.
If you are using the ormap demo, then this is an entity bean based sample and will need a database.
The database configurations are stored at the server level in the j2ee/home/config/data-sources.xml file. In this file you will see entries that define a datasource using a set of "locations", provides details on where the database instance (host, port, sid) and what the logon details are.
For the container, a default-data-source is defined (ie one to use if no others are supplied) in the j2ee/home/config/application.xml.
<orion-application autocreate-tables="false"
default-data-source="jdbc/OracleDS">
To make it work simply, make sure that you have a datasource named jdbc/OracleDS defined in the data-sources.xml file (which should be there as a template) and that the connection details for it point to a valid database instance and user.
cheers
-steve- -
Dear all,
I have been trying to connect to Oracle 8 from Java but without success.
I am using the following driver: oracle.jdbc.driver.OracleDriver
and the thin protocol as follows:
jdbc:oracle:thin:userid/password@databasename:1512:sid
I am getting the error message:
java.sql.SQLException: Io exception: The Network Adapter could not establish th
connection
I am using jdk1.3 with classes12.zip added to the classpath settings.
Can anybody help please.
Regards,
[email protected] or [email protected]
nullDear colleague,
I am using a stand alone database running on my windows 98 laptop.
I connect successfully via sql plus using the user id: scott and password tiger.
Below is the entry of my tnsname.ora:
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
I am finding difficult to specify a host, but I have tried the following combinations:
DriverManager.getConnection ("jdbc:oracle:thin:@koudry:1521:PLSExtProc","scott", "tiger");
where the machine name is koudry and PLSExtProc the sid.
DriverManager.getConnection ("jdbc:oracle:thin:@localhost:1521:PLSExtProc","scott", "tiger");
and also 127.0.0.1 which is the ip address of the localhost. All these give me the following error:
Exception in thread "main" java.sql.SQLException: Io exception: The Network Adap
ter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:263)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at web.main(web.java:10)
When I use the oci protocol like:
DriverManager.getConnection ("jdbc:oracle:oci8:@127.0.0.1:1521:PLSExtProc","scott", "tiger");
I get the following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: make_c_state
at oracle.jdbc.oci8.OCIDBAccess.make_c_state(Native Method)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:233)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:249)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at web.main(web.java:10)
Below is the entry for autoexec.bat:
set classpath=.;c:\oracle\ora81\jdbc\lib\classes12.zip;
mode con codepage prepare=((850) C:\WINDOWS\COMMAND\ega.cpi)
mode con codepage select=850
keyb uk,,C:\WINDOWS\COMMAND\keyboard.sys
SET Path=c:\Oracle\Ora81\lib;c:\Oracle\Ora81\bin;"C:\PROGRAM FILES\ORACLE\JRE\1.1.7\BIN";C:\WINDOWS;C:\WINDOWS\COMMAND;C:\;C:\DOS;C:\JDK1.3\BIN;C:\MSSQL7\BINN;C:\JDK1.3\SRC;
Can anyone see what I am doing wrong.
Thanks,
Richard Koudry
null
Maybe you are looking for
-
Include Button that executes PL/SQL procedure to SQL query based region
I would like to add two columns to a SQL query region. These columns would not be sourced from the query, but rather would be used to execute a PL/SQL procedure. For example, I would like to have a manager approve or deny adding an additional employe
-
How can I put my itunes library on my Airport Time Capsule 3TB and still play thru Apple TV?
I am trying to free up space on my 1TB iMac and would like to put iTunes/burned movies/music to Airport Time Capsule 3tb. At the same time I would like tobe able to play said media through my Apple TV.
-
Can I create a development environment for a site redesign?
I need to redesign my site templates and eventually move all pages to the new design. Is there an easy way to do this with BC? Can I export my current site and edit it locally for example?
-
SAP Transaction in WebGui ?
Hi, I call a SAP Transaction within a GP Callable Object of type SAP Transaction. I whant to use the WebGUI for starting the transaction and not the WINGUI, which will be started by default. How can I change this ? Regards, Gerald
-
Sending Adobe forms through Email and Fax
Hi , I have created an Adobe Form i.e. PO Form, whose print/driver program is customised / based on SAPFM06P and routine used is ADOBE_ENTRY_NEU. So , now I use the transaction ME22N and use the External Send option i.e sending Email , but the Email