?
Solved

Cannot Instantiate OracleDriver 8.1.7 in Microsoft JVM

Posted on 2001-08-24
3
Medium Priority
?
286 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Expert Comment

by:googlyralph
ID: 6422436
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
ID: 7773713
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
ID: 7861661
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

762 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