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)