LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 08:59 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Rep: Reputation: 32
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, 09:38 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,916

Rep: Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689
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, 04:27 AM   #3
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:38 AM
Oracle 9i on Suse Linux 10 granvillec Linux - Newbie 4 10-13-2006 03:23 AM
Problem Connecting to Enterprise Linux 3.0 using ssh protocol from Oracle moturi_2002 Linux - Enterprise 2 11-12-2004 03:34 PM
connecting to oracle on linux suchi_s Programming 4 07-09-2004 03:24 AM
Linux Suse 8.1 w Oracle 8i miklittle Linux - General 2 01-14-2003 09:09 AM


All times are GMT -5. The time now is 06:47 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration