Solved

Cannot Instantiate OracleDriver 8.1.7 in Microsoft JVM

Posted on 2001-08-24
3
275 Views
Last Modified: 2008-03-06
We have an existing application which requires us to stay with MSJ++ for now. Most of the data is stored in SQLServer7. We are attempting to migrate some of the data to Oracle8i. I am having a problem in trying to instantiate the OracleDriver received in classes111.zip with Oracle 8i 8.1.7.  The table we are migrating is used to store XML documents with an average size of approximately 4 K, but possibly larger.

When attempting to use the OracleDriver (either one from classes111.zip), and watching in the J++ debugger, it appears that the attempt to instantiate the OracleDriver causes the virtual machine to hang. classes111.zip is in the CLASSPATH. Is it necessary to use the JDBCODBC bridge, or can the OracleDriver class, and perhaps oci8 be used within MSJ++ ? How?

We anticipate storing the XML data in a CLOB column, and would like to focus the effort on the appropriate driver, since it appears that the approach may vary somewhat depending on the driver. Is there a more appropriate / easier way to store XML in Oracle than using a CLOB? Under SQL7, it was an ntext column.

I'm offering only 75 points, because that is what I have available.  Hope it is sufficient...

Thank you.


The application hangs prior to any attempt to to connect to the server.  In the interest of granularity, I have separated the typical line of sample code which instantiates, and registers the driver, into two lines of code.  They are as follows:

oracle.jdbc.driver.OracleDriver oDriver = new oracle.jdbc.driver.OracleDriver();

DriverManager.registerDriver(oDriver);

I've tried using the oracle.jdbc.OracleDriver (no ".driver") as well, since both are listed in the classes111.zip.  I have not tried classes12.zip.  Not sure whether that would work, since I'm using a 1.1 jdk, but I may try it.

From looking at your website http://users.aber.ac.uk/pms/java/usingoracle.html
I see that you use
Class.forName("oracle.jdbc.OracleDriver");
to register the driver.  Unfortunately, even though classes111.zip is in my classpath, this results in a ClassNotFoundException at run time.  I've now commented out the code and am attempting to use the DriverManager.registerDriver() above, but as I said cannot instantiate the OracleDriver class.  I am able to use the JDBCODBC bridge, but have some concerns about reliability and performance, especially with LOBs.

By the way, from reviewing release notes for Oracle 8.1.7 regarding jdbc, it appears that the only way to reliably stream data into an LOB using JDBC is using the >>oci<< driver.  Other web info (from otn.oracle.com and upenn.edu) about which actual driver can be used with the Microsoft JVM seems to indicate that I would have to use the >>thin<< Oracle driver (Javasoft's VM is not an option for us at this time).  So, I am beginning to think that I will have to use a stored proc accessed via the JDBCODBC bridge...

0
Comment
Question by:spingarnd
3 Comments
 
LVL 1

Expert Comment

by:googlyralph
Comment Utility
can you give the connection strings that you are using to oracle? (also, have you tried using hte classes12.zip (jdk1.2 and above)?)
i have been doing a lot with Oracle <-> java and have had many problems and so have some idea what i am doing now...

(Also, the following URL (to part of my un-linked to my site) http://users.aber.ac.uk/pms/java/usingoracle.html may be of use.

GR.
0
 
LVL 5

Expert Comment

by:vemul
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- To be PAQ'ed and points NOT refunded

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

vemul
Cleanup Volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
Comment Utility
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now