[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

oracle jdbc thin driver

Posted on 2013-05-17
5
Medium Priority
?
605 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Are You Ready for GDPR?

With the GDPR deadline set for May 25, 2018, many organizations are ill-prepared due to uncertainty about the criteria for compliance. According to a recent WatchGuard survey, a staggering 37% of respondents don't even know if their organization needs to comply with GDPR. Do you?

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

649 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