Solved

Cannot Instantiate OracleDriver 8.1.7 in Microsoft JVM

Posted on 2001-08-24
3
282 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
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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java - Why doesn't this JFrame work 3 59
Error trying to install RTMT Win7 5 60
Oracle SQL syntax check  without executing 6 56
sql import cannot be resolved jsp 3 23
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

809 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