Solved

oracle jdbc thin driver

Posted on 2013-05-17
5
563 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
:)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
The viewer will learn how to implement Singleton Design Pattern in Java.

763 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

14 Experts available now in Live!

Get 1:1 Help Now