Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> JDBC connect to Oracle from Linux but not Windows - identical code!

JDBC connect to Oracle from Linux but not Windows - identical code!

From: Roger Hand <RogerBucket_at_PlasticSun.com>
Date: 19 Nov 2001 02:55:07 -0800
Message-ID: <6c07e9be.0111190255.6d20f3cc@posting.google.com>


I am trying to connect a Windows machine to an Oracle database using JDBC. And it works to one Oracle database (version 8.1.6, let's call it ora1) from either Windows machine. This tells me that the Java code is working, and the network connection is there.

However, I can't connect to the other Oracle database (version 8.1.7, let's call it ora2) from either Windows machine. The error message is "java.sql.SQLException: Io exception: The Network Adapter could not establish the connection". I can ping both ways.

But . . . I can connect to ora1 AND ora2 from a Linux box! This tells me that ora2 is up and running, and also that I've got the correct JDBC url, password, etc.

I wrote test code that I copied over to each box, and included the Oracle JDBC driver for good measure. So the code on each machine is identical - how come the Linux box can connect to ora2 but the Windows boxes can't?

Put another way: Is there any reason why I might be able to . . .

connect to ora1 (8.1.6) from both Linux and Windows, and . . . 
connect to ora2 (8.1.7) from Linux but not Windows????  Again, the
code is identical . . .

The only differences are the JVM, the Oracle version, and, of course, the OS. On the Windows boxes I've tried JVM 1.3.0 as well as 1.3.1_01. The Linux box is running 1.3.0_02.

The database guy has monitored the Oracle databases while I'm attempting to make the connection, and on both ora1 and ora2 it appears that the connection is established, but for some reason the Windows boxes never seem to get the message back from ora2.

Some more details: ora1 and ora2 are both at a co-lo, which is connected via a vpn to our office, where the Linux and Windows clients are. I'm using Oracle's thin JDBC 8.1.7 driver. One Windows machine is Win 98, the other is NT 4. Oracle is running in both cases on RedHat 7.1.

Any ideas? We're all baffled!

Thanks in advance . . .

-Roger Received on Mon Nov 19 2001 - 04:55:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US