Solved

oracle jdbc thin driver

Posted on 2013-05-17
5
582 Views
Last Modified: 2013-05-20
I'm using oracle jdbc thin driver to connect to database,
"url" : "jdbc:oracle:thin:@www.test.com:1521:xxx",
 it worked on inside server.
But on outside server, it gives the following error:

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

I've opened up www.test.com server port: 1521 sqlnet to outside server IP. Not sure what's the problem. THanks.
0
Comment
Question by:xiaoyunwu
5 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 39175243
telnet www.test.com 1521

Open in new window

If that don't work, then the driver won't either. Only you can find out why ...
0
 
LVL 35

Expert Comment

by:johnsone
ID: 39175406
If the server is behind a firewall, opening up port 1521 doesn't get you what you need.  The listener listens on that port, but the actual connection is passed off to an open high numbered port.

The best way to avoid this that I know of is by using Connection Manager.  It can run on the database server on port 1521 and then pass off the connection to the database listener on any port.  Then all traffic goes through 1521.

The documentation for Connection Manager is here:

http://docs.oracle.com/cd/E11882_01/network.112/e10836/cman.htm#i491788
0
 
LVL 16

Expert Comment

by:Valeri
ID: 39176804
is there a firewall between your PC and the remote host /the outside server/ ?
is there a difference of the versions of oracle running on inside and outside servers?
1. check if database server host name exists in the etc/hosts file
2. change the jdbc driver class from oracle.jdbc.driver.OracleDriver to oracle.jdbc.OracleDriver
0
 

Author Closing Comment

by:xiaoyunwu
ID: 39181388
Actually opening 1521 is good enough. I solved the problem by using IP address (123.123.12.1) instead of name (www.test.com)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39181393
:)
0

Featured Post

Now Available: Firebox Cloud for AWS and FireboxV

Firebox Cloud brings the protection of WatchGuard’s leading Firebox UTM appliances to public cloud environments. It enables organizations to extend their security perimeter to protect business-critical assets in Amazon Web Services (AWS).

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Internet link load balancer 6 94
swing controls 2 24
Updating a temp table inside a PL/SQL block 3 51
Html split(text) 2 32
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question