Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Oracle Blobs: I'm desperate

0 views
Skip to first unread message

Till Krech

unread,
Dec 8, 2000, 5:25:42 PM12/8/00
to
Hi,

since several days, I try to get a blob into a Oracle 8.05 database (and out again) using oracles thin driver.
I tried the examples - nothing works. I think I got nearly every SQLException, you can imagine.

Now, when I call getBLOB on an OracleResultSet, I get the following Exception:

java.lang.NoClassDefFoundError: java/sql/Blob
at oracle.jdbc.driver.OracleStatement.get_blob_value(OracleStatement.java:4427)
at oracle.jdbc.driver.OracleStatement.getBLOBValue(OracleStatement.java:2994)
at oracle.jdbc.driver.OracleResultSetImpl.getBLOB(OracleResultSetImpl.java:478)
at OracleTest.insert(OracleTest.java:76)
at OracleTest.main(OracleTest.java:125)

when executing this piece of code

String query = "select daten from blobs where id=? for update";
try {
PreparedStatement st = conn.prepareStatement(query);
st.setInt(1, id);
ResultSet rs = st.executeQuery();
int i = 0;
while (rs.next()) {
blob = ((OracleResultSet)rs).getBLOB(1);
System.out.print("result #" + i++);
}
st.close();
} catch (Exception e) {
e.printStackTrace();
}


java/sql/Blob is just an interface. As I understand, there must be class which implements this interface - where else than in the Oracle driver ?

Does the thin driver really support blobs or not ? I Did not find a definitive answer.
What am I doing wrong ?????????

Till


Konstantin Gordiyenko

unread,
Dec 11, 2000, 8:26:30 PM12/11/00
to
It seems that you're using JDK 1.1.x with classes12.zip. Use
classes111.zip for JDK 1.1.x, classes12.zip for JDK 1.2 and higher.
konstantin.vcf
0 new messages