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