Partha Sur

Greenhorn
+ Follow
since Feb 18, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Partha Sur

Hi all,
I fixed the problem ... The Oracle listener was not running. This gave the adapter error.
So I checked the listener status by
lsnrctl status
and then started the listener:
lsnrctl start
After that I was able to connect with no change in code ... The URL was correctly coded.
Anyway thanks to all for your help.
Best wishes,
Partha
Dhaval,
If you want to learn JDBC for Oracle the following book is hard to beat :
"Java Programming with Oracle JDBC" by Donald Bates (O'Reilly)
Partha
Hello,
I am unable to connect to Oracle 8i 8.1.7.0 (Personal Edition) on my Windows 98 (second edition) system. I am using JDK1.3 as the jre for program development (javac, java etc). I am using the JDBC "thin" driver which was installed as classes12.zip when I installed Oracle 8i. Following are the details of my environment.
Microsoft(R) Windows 98
(C)Copyright Microsoft Corp 1981-1999.
C:\WINDOWS>set PATH=C:\jdk1.3.0_02\bin;
C:\WINDOWS>set CLASSPATH=.;D:\Oracle\Ora81\jdbc\lib\classes12.zip;
C:\WINDOWS>echo %PATH%
C:\JDK13~1.0_0\BIN;
C:\WINDOWS>echo %CLASSPATH%
.;D:\Oracle\Ora81\jdbc\lib\classes12.zip;
C:\WINDOWS>
Oracle connectivity
===================
# TNSNAMES.ORA Network Configuration File: d:\Oracle\Ora81\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
PARTHA.SUR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = partha)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = partha.sur)
)
)
# LISTENER.ORA Network Configuration File: d:\Oracle\Ora81\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = partha)(PORT = 1521))
)
)
(DESCRIPTION =
(PROTOCOL_STACK =
(PRESENTATION = GIOP)
(SESSION = RAW)
)
(ADDRESS = (PROTOCOL = TCP)(HOST = partha)(PORT = 2481))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = d:\Oracle\Ora81)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = partha.sur)
(ORACLE_HOME = d:\Oracle\Ora81)
(SID_NAME = partha)
)
)
And now the program
===================
import java.sql.* ;
class TestThinApp
{
public static void main (String args [])
throws ClassNotFoundException, SQLException
{
Class.forName ("oracle.jdbc.driver.OracleDriver") ;
Connection conn = DriverManager.getConnection (
"jdbc racle:thin:@partha:1521 artha", "scott", "tiger") ;
Statement stmt = conn.createStatement () ;
ResultSet rset = stmt.executeQuery (
"select 'Hello Thin Driver Tester '||USER||'!' result from dual") ;
while (rset.next ())
System.out.println (rset.getString (1)) ;
rset.close () ;
stmt.close () ;
conn.close () ;
}
}
When I run this I get exception
===============================

C:\myJava\jdbc>javac TestThinApp.java
C:\myJava\jdbc>java TestThinApp
Exception in thread "main" java.sql.SQLException: Io exception: The Network Adap
ter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at TestThinApp.main(TestThinApp.java:10)
C:\myJava\jdbc>
PLEASE HELP !!!
I seem to have followed all the rules ...
I have been trying for a long time and would like help with resolution.
I also tried downloading the JDBC "thin" driver
for Oracle 8.1.7.0 but the Oracle site only lists the 8.1.7 thin drivers for NT. Does this work for Windows 98 also ? So I am using the drivers that came with the Oracle 8i 8.1.7 (Personal) installation CD.
Does the JDBC "thin" driver not work with the Personal edition Oracle 8i database ?
Thanks in advance for any help.
Regards,
Partha Sur
Is there any good VisualCafe 4 tutorial ... I am new to Java (well I have just completed a course in Java 101). I would be obliged if anyone will tell me a good website for a VisualCafe 4 tutorial. Thanks.
17 years ago