Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Oracle JDBC cannot establish connection

4 views
Skip to first unread message

Jonas Olsson

unread,
Nov 6, 2001, 3:16:15 AM11/6/01
to
I'm using the Oracle thin JDBC drivers (1.2) installed with Oracle
8.1.6 on HP-UX.

The URL is use is: jdbc:oracle:thin:@HOST:1521:SID (HOST and SID are
replaced by my values)

This works OK when I'm on the HP-UX server, but when I'm on my Windows
2K Pro it says:

java.sql.SQLException: IO-poikkeus: 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:210)

at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:251)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)

On the server I can use both 127.0.0.1 and the actual IP, on my W2K I
get the same error for both IP and hostname (not 127.0.0.1 of course).
Both machine know eachother by both name and IP (ping works). I can
telnet the JDBC-port (1521) on the server and an application server
running on the HP can use the database (via JDBC) just fine.

What is this?

/jonas

Andrew

unread,
Nov 6, 2001, 9:23:25 PM11/6/01
to
Jonas....@cambiosys.com (Jonas Olsson) wrote in message news:<1eea56d6.0111...@posting.google.com>...
You can try native oracle connection string String l_dbConnectString
=
"(DESCRIPTION=(ADDRESS=(HOST=163.256.133.5)"+
"(PROTOCOL=tcp)(PORT=1521))"+
"(CONNECT_DATA=(SID='john')))";


Connection con= DriverManager.getConnection("jdbc:oracle:thin:@"+l_dbConnectString,"john","doe");

But check for drivers version (in oracle web-site no drivers for 8.1.6
- only 8.1.5 and 8.1.7)

Good luck!
Andrew

0 new messages