JDBC Thin Driver and Connection for Oracle 8.1.6 on Windows 98 [message #90963] |
Mon, 14 January 2002 16:06 |
Jeff Marendo
Messages: 1 Registered: January 2002
|
Junior Member |
|
|
Hello,
I thought that I would just post this as information for anyone who has had trouble while trying to do any JDBC work with Oracle 8i personal edition for Windows 98. I ran into some trouble initially and had to search around a bit before getting things to work properly.
The problems I encountered:
1. The Oracle class name for the thin driver.
I needed it to use as the argument in the Class.forName() call. Turned out to be "oracle.jdbc.driver.OracleDriver". Make sure you have classes12.zip set correctly on your classpath for that.
2. The URL necessary for making a connection to the database.
I was confused on this at first. Turned out to be of the format:
(jdbc driver name):@(host)(port)(sid for datasource)
In the sample program I was using, that corresponded to:
String url = "jdbc:oracle:thin:@localhost:1521:oracle";
3. I was getting an IO error that stated "The Network Adapter could not establish a connection".
Apparently when running Oracle on Windows 98 (and on other OSs, it seems), a listener needs to be up and running. In Windows 98, the listener doesn't start automatically so you have to start it. Open a MS-DOS console and issue the command:
lsnrctl start
That will start it. You should be able to find a bunch of .html files related to that listener under your installation directory to read up on it and the other related material.
Everything worked after that. For those of you who already know this, disregard. But for those of you out there trying to do some JDBC on a Windows 98 client and you have Oracle 8i Personal Edition running on the same machine, perhaps this posting will help out.
Also make sure that your classpath is set similarly to the following:
CLASSPATH=C:javajarsjdbc2_0-stdext.jar;[[ORACLE_HOME]]jdbclibclasses12.zip;[[ORACLE_HOME]]jdbclibnls_charset12.zip
SET path="C:Program FilesOraclejre1.1.7bin";"%path%";
SET Path=[[ORACLE_HOME]]bin;"%Path%"
SET PATH=[[ORACLE_HOME]]jdbclib;"%PATH%"
Jeff
|
|
|
sqlj jdbc driver [message #91036 is a reply to message #90963] |
Sat, 02 March 2002 08:22 |
vishnu.s
Messages: 1 Registered: March 2002
|
Junior Member |
|
|
i have problem in running sqlj programes
i have set three variables
1)ORACLE_HOME=c:oracleora81
2)path=c:jdk1.2bin
3)classpath=c:oraclesqljlib
even after setting these paths i cannot run sqlj programes ,when i give command sqlj <program>.sqlj
and i give java <program>
the program is not working
please tell me what should i do to run the program
|
|
|
|
|
|