LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2009, 07:59 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Rep: Reputation: 33
Problem by connecting Oracle from SuSE Linux


Hi all,

I installed the VMware on the host (Windows XP) and then installed a guest syste of SuSE Linux.

I wrote a java program which just try to connect to the Oracle database installed on the host. I ran this program successfully on host.

But as I ran this program from on Linux, I got exception as follow.

I've installed the Oracle Express Client and added following configuration in file .bashrc

Someone can help?

Code:
...
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client;export ORACLE_HO
ME
PATH=$ORACLE_HOME/bin:$PATH;export PATH
NLS_LANG=AMERICAN_AMERICA.AL32UTF8;export NLS_LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH;export LD_LIBRARY_PATH
SQLPATH=$ORACLE_HOME/sqlplus;export SQLPATH

. /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin/oracle_env.sh
...
Code:
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:439)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
        at java.sql.DriverManager.getConnection(DriverManager.java:620)
        at java.sql.DriverManager.getConnection(DriverManager.java:200)
        at com.weichen.app.App.main(App.java:26)
 
Old 09-06-2009, 08:38 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by thomas2004ch View Post
Hi all,

I installed the VMware on the host (Windows XP) and then installed a guest syste of SuSE Linux.

I wrote a java program which just try to connect to the Oracle database installed on the host. I ran this program successfully on host.

But as I ran this program from on Linux, I got exception as follow.

I've installed the Oracle Express Client and added following configuration in file .bashrc

Someone can help?

Code:
...
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client;export ORACLE_HO
ME
PATH=$ORACLE_HOME/bin:$PATH;export PATH
NLS_LANG=AMERICAN_AMERICA.AL32UTF8;export NLS_LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH;export LD_LIBRARY_PATH
SQLPATH=$ORACLE_HOME/sqlplus;export SQLPATH

. /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin/oracle_env.sh
...
Code:
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:439)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
        at java.sql.DriverManager.getConnection(DriverManager.java:620)
        at java.sql.DriverManager.getConnection(DriverManager.java:200)
        at com.weichen.app.App.main(App.java:26)
Please see your other, very-similar, thread.
 
Old 09-07-2009, 03:27 AM   #3
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Original Poster
Rep: Reputation: 33
I solved the problem now. It's a firewall issue. I set an xception in the Windows firewall for the Linux ip and it works.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem connecting net through nokia 7610 cable modem on suse linux 10 prashantaghamkar Linux - Networking 2 04-02-2008 10:38 AM
Oracle 9i on Suse Linux 10 granvillec Linux - Newbie 4 10-13-2006 02:23 AM
Problem Connecting to Enterprise Linux 3.0 using ssh protocol from Oracle moturi_2002 Linux - Enterprise 2 11-12-2004 02:34 PM
connecting to oracle on linux suchi_s Programming 4 07-09-2004 02:24 AM
Linux Suse 8.1 w Oracle 8i miklittle Linux - General 2 01-14-2003 08:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration