Solved

oracle 8i driver for JDBC on sun solaris 8 sparc Platform

Posted on 2004-08-04
13
1,108 Views
Last Modified: 2013-12-05
Hi guys,
i have a sun ultra 10 sparc platform with solaris 2.8(SUNOS 5.8) and oracle 8i(8.1.7) installed.
we need oracle driver for  JDBC that is compatible with this version.
we've searched the web and couldnt find something useful...also we downloaded some drivers but without any success...
any help will be appreciated.
 
0
Comment
Question by:ramoo
  • 4
  • 3
  • 2
  • +1
13 Comments
 
LVL 7

Accepted Solution

by:
grim_toaster earned 50 total points
ID: 11723571
You should be able to use the standard classes12.zip, which can be downloaded from the following link for 8.1.7 (although I believe you can use the more recent drivers):
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc817.html

-->also we downloaded some drivers but without any success
What problems were you having?  Exceptions?
0
 
LVL 4

Expert Comment

by:alikoank
ID: 11724743
you can download all kind of oracle-related stuff from Oracle Technology Network

http://otn.oracle.com
0
 
LVL 4

Expert Comment

by:ramumorla
ID: 11734710
Oracle JDBC driver comes with Oracle, the file is classes12.zip for Oracle 8i
   and ojdbc14.jar for Oracle 9i (and JDK 1.4). You can also download the drivers
   from oracle.com (On Oracle's Download page, click on the Oracle JDBC Drivers link
   and select the proper version to download).

   Please note that, for oracle 8.16 or ealier, you must download a updated version
   of classes12.zip; and the ojdbc14.jar driver works only for JDK1.4 or later.
   Here is a possible Exception by using an out-dated clases12.zip dirver:

   java.sql.SQLException: ORA-01009: missing mandatory parameter

   If you use classes12.zip on Oracle 8i databases and Tomcat, you might need rename
   classes12.zip to classes12.jar, since Tomcat may not classload a zip file.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 4

Expert Comment

by:ramumorla
ID: 11734716
0
 
LVL 4

Expert Comment

by:ramumorla
ID: 11734722
0
 

Author Comment

by:ramoo
ID: 11780957
OK friends the drivers are ok i think maybe i'm doing something wrong.here is what i have in more details.any ideas or clues about what i'm doing wrong?

============
system properties
============
Oracle 8i(8.1.7)
Solaris 8 sparc platform(sun ultra 10)
java VM 1.2
-----------------------------
I have this zip file "classes12.zip" which is the collection of classes as Oracle Drivers.
I puted it at location /usr/orcldrv
Then using csh shell and defining Environment by setenv command as :
waveiew# setenv CLASSPATH /usr/orcldrv/classes12.zip
This is the related code of establishing the connection with oracle DB  :
---------------------------------------------------------------------------------

      // This is the fragment code of declaration of necessary variables

      String driverName="oracle.jdbc.driver.OracleDriver";
      String ServerName="127.0.0.1";
      String portNumber="1521";
      String sID="OMCDB";
      String url = "jdbc::oracle:thin:@"+ServerName+":"+portNumber+":"+sID;

      Connection con;
      Statement stmt, ratesStmt;


      // Now connecting to Oracle Driver

            try {
                  //Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                  Class.forName(driverName);
            } catch(java.lang.ClassNotFoundException e) {
                  System.err.print("ClassNotFoundException: ");
                  System.err.println(e.getMessage());
            }
            try{
                  con = DriverManager.getConnection(url,"pola", "pola");
            }catch(SQLException ex) {
                  System.out.println("Godar");
                  ex.printStackTrace();}
---------------------------------------------------------------------------------


And this is the exception thrown when running the program :

-----------------------------
ClassNotFoundException : oracle.jdbc.driver.OracleDriver
java.sql.SQLException : No suitable driver
      at java.lang.Throwable.fillInStackTrace(Native Method)
      at java.lang.Throwable.fillInStackTrace(Compiled code)
      at java.lang.Throwable.<init>(Compiled Code)
      at java.lang.Exception.<init>(SQLException.java:64)
      at java.sql.DriverManager.getConnection(Compiled Code)
      at java.sql.DriverManager.getConnection(DriverManager.java:137)
      ...(my code positions makes excepion )
-----------------------------

I then used javac,javah,jdb for the same purpose, and the same exception was thrown.
After it I converted the .zip file to .jar file, and the same problem.

0
 
LVL 7

Expert Comment

by:grim_toaster
ID: 11781305
How are you running the program?  You should specify:

java -cp /usr/orcldrv/classes12.zip ClassName
0
 

Author Comment

by:ramoo
ID: 11799789
Friends,
I'm getting the same error after doing last note,
error:
exception in thread "main" java.lang.NoclassDefFoundError:oracleSql.class.

the class name that i specified is oracleSql.class.
looks that it doesnt recognizes the folder classes12.zip or classes12.jar or cannot read those folders.


0
 
LVL 7

Expert Comment

by:grim_toaster
ID: 11807540
The class is incorrectly referenced, it should be "OracleSql" not "oracleSql".
0
 
LVL 7

Expert Comment

by:grim_toaster
ID: 12109620
The original question was answered in the first post (by me), I have no idea how to provide you the link to it though!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle - SQL Parse String 5 45
migration MS SQL database to Oracle 30 68
ORA-02288: invalid OPEN mode 2 57
join actual table rows based on the column 25 22
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question