Solved

oracle jdbc thin driver

Posted on 2013-05-17
5
576 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 34

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse shortcuts 9 45
replace a word with other 1 40
Google Play app store not being blocked from smartphones 4 34
sort a spool into file output in oracle 1 22
Imagine you have a shopping list of items you need to get at the grocery store. You have two options: A. Take one trip to the grocery store and get everything you need for the week, or B. Take multiple trips, buying an item at a time, to achieve t…
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.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

861 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now