Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Writing CLOB field in a java Object

421457May 17 2004 — edited Sep 24 2004
Hi,

I have an Oracle OBJECT type that has 2 CLOB fields and I am trying to read and write these objects using JDBC and he SQLData interface.

Read the CLOB fields is fine, however writing the CLOB fields is resuling in the error:

ORA-17059
Fail to convert to internal representation

When I read using the SQLInput interface I use the readClob() method.

However, when I write using the SQLOutput interface I do not have a Clob object and therefore cannot use the writeClob() method.

My Client side Java field for the Clob is a String so I am converting the String to a character stream and then using SQLOutput.writeCharacterStream(). However this yeilds an ArrayIndexOutOfBounds exception.

What am I doing wrong here?

How are you supposed to write to an OracleObject CLOB field from within the writeSQL() method of the SQLData interface?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 22 2004
Added on May 17 2004
2 comments
1,487 views