[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

compiler not finding:  OracleResultSet

Posted on 2001-08-15
10
Medium Priority
?
1,196 Views
Last Modified: 2012-05-04
Hi all,

I am making the call below:        

Clob c = ((OracleResultSet) rs).getClob("TEXT");

and I get this error during compilation that OracleResultSet is not being found. what do i need to include in my classpath ?

thanks,
Johnny

0
Comment
Question by:xxxJohnnyBlaze
[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
  • 6
  • 3
10 Comments
 
LVL 6

Expert Comment

by:kotan
ID: 6388438
Did you include the package of OracleResultSet?
0
 

Author Comment

by:xxxJohnnyBlaze
ID: 6388461
hi kotan,

i've included /jdbc/lib/classes111.zip.  is there a separate OracleResultSet package?

thanks
Johnny
0
 

Author Comment

by:xxxJohnnyBlaze
ID: 6388504
hi kotan,

i've included /jdbc/lib/classes111.zip.  is there a separate OracleResultSet package?

thanks
Johnny
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 19

Expert Comment

by:Jim Cakalic
ID: 6388517
You need to import oracle.jdbc.*, if memory serves, so that the OracleResultSet is visible in your code.

Best regards,
Jim Cakalic
0
 

Author Comment

by:xxxJohnnyBlaze
ID: 6388598
hi Jim Cakalic,

I imported oracle.jdbc.*
the compiler still can't find OracleResultSet.

thanks,
Johnny
0
 
LVL 19

Expert Comment

by:Jim Cakalic
ID: 6388632
Sorry, my memory _didn't_ serve me correctly. That should have been
    import 'oracle.jdbc.driver.*;

And, of course, the full path to classes111.zip (or classes12.zip) in the classpath.

Jim
0
 

Author Comment

by:xxxJohnnyBlaze
ID: 6388684
thanks for the help jim.  i was able to find the object. but then i get this error during compilation.
**** begin of error ***********
 The method oracle.jdbc2.Clob getClob(java.lang.String) declared in class oracle.jdbc.driver.OracleResultSet cannot override the method of the same signature declared in interface java.sql.ResultSet.  They must have the same return type.  

********  end of error ************

the same message appears for getBlob, getRef, getArray ...
it seems that there's method name conflict with java.sql.*

is there a way to take of this?

thanks,
Johnny
0
 

Author Comment

by:xxxJohnnyBlaze
ID: 6388722
Also,

I have my imports set up as this:

    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.Statement;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    import oracle.sql.*;
    import oracle.jdbc.driver.*;
    import java.io.*;

now I get the error: that the compiler cannot find the Object "Clob"

Johnny
0
 
LVL 19

Accepted Solution

by:
Jim Cakalic earned 150 total points
ID: 6388895
First the compilation error. The conventional wisdom seems to be that there were some problems related to LOBs in early editions of the jdbc drivers. Several comments I have read indicate that using the latest edition (8.1.7) of the drivers will solve this. Oracle maintains excellent backwards compatibility so this shouldn't be a problem. The OTN download page links are wrong. Go directly to
    http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html

Also, is it necessary for you to use classes111.zip? This is for JDK 1.1.x environments. If you are using a Java 2 environment, you would be better served to download the drivers for Java 2 and use classes12.zip. Once you have the drivers, you can just drop the classes12.zip file in your lib directory and change the classpath.

As for your other problem, the Oracle javadoc seems to 'randomly' refer to oracle.jdbc2.Clob and oracle.sql.CLOB. I've looked through the driver classes and cannot find an oracle.jdbc2.Clob. I'm assuming that it is an old reference which hasn't been fixed in the javadoc. The class you want is oracle.sql.CLOB. Note that it is 'CLOB' and not 'Clob' -- all uppercase.

Hope this helps.
Jim
0
 

Author Comment

by:xxxJohnnyBlaze
ID: 6390318
thanks for all the help Jim.

oracle docs were very deceiving.  i finally had to create a work around.

thanks,
Johnny
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
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…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
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 …
Suggested Courses

649 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