?
Solved

oracle jdbc thin driver

Posted on 2013-05-17
5
Medium Priority
?
610 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 1500 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

 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

Question has a verified solution.

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

This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
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 how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month14 days, 3 hours left to enroll

809 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