Home » Developer & Programmer » JDeveloper, Java & XML » why that Clob.length() does not work on Oracle9.2 but work on Oracle9.0.1?
why that Clob.length() does not work on Oracle9.2 but work on Oracle9.0.1? [message #91819] Wed, 05 March 2003 07:10 Go to next message
Arman Melkumyan
Messages: 2
Registered: March 2003
Junior Member
Hi!
I have a code on Java for reading Clob data and there were some crazy things ... there are differents in JDBC drivers of Oracle9.2 and Oracle9.0.1 and some things which I can not understand.

I've the following code which works on Oracle9.0.1 with its driver (classes12.jar) but doesn't work on Oracle9.2
ResultSet rsResults = .......;
...
...
java.sql.Clob clobText = rsResults.getClob(2);

Oracle9.2 generates this error:

java.sql.SQLException: No more data to read from socket
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:963)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)
at oracle.jdbc.ttc7.v8TTILob.receiveReply(v8TTILob.java:955)
at oracle.jdbc.ttc7.v8TTILob.getLength(v8TTILob.java:297)
at oracle.jdbc.ttc7.TTC7Protocol.lobLength(TTC7Protocol.java:2705)
at oracle.sql.LobDBAccessImpl.length(LobDBAccessImpl.java:468)
at oracle.sql.CLOB.length(CLOB.java:214)

After that, Ive tried with replacing of java.sql.Clob to oracle.sql.CLOB
as :

oracle.sql.CLOB clobText = (oracle.sql.CLOB)rsResults.getClob( ... );

and it sometime works, seometimes doesn't work or Oracle9.2 : returns the same error:

java.sql.SQLException: No more data to read from socket
....
....
....
(LobDBAccessImpl.java:468)
at oracle.sql.CLOB.length(CLOB.java:214)

Why that Clob.length() does not work on Oracle9.2 but work on Oracle9.0.1.
Or Why that oracle.sql.CLOB.length() does not work correctly

Thanks,
Arman.
Re: why that Clob.length() does not work on Oracle9.2 but work on Oracle9.0.1? [message #92194 is a reply to message #91819] Sat, 10 April 2004 02:31 Go to previous message
Animesh
Messages: 1
Registered: April 2004
Junior Member
Greetings...............
this code will help u to access Clob data from oracle Reader read1=res.getCharacterStream(1);
use getCharacterStream(); instead of getClob() this will give u Reader object
Previous Topic: Virus in BLOB
Next Topic: sqlj deploying
Goto Forum:
  


Current Time: Sat Jul 24 15:59:51 CDT 2021