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!

Data output in two Clob columns are switched

david.karrSep 6 2007 — edited Sep 26 2007
I'm using Spring 1.2.8, Hibernate 3.2.5, Websphere 6, JDK 1.4.2, and Oracle 9i, although for this test case I'm using the 10g driver.

I have a table with a small number of columns, and two of them are Clob columns. When I write the data out with Hibernate and then look at the database, the data is all there, but the values in the two Clob columns are reversed (data in other non-clob columns is fine). I've stared at my code for a long time now, and I've even stepped into the Hibernate code that calls PreparedStatement.setCharacterStream(). As far as I can tell, it's passing the correct index and value each time.

I don't know if this is relevant, but the Hibernate Oracle dialect specifies that Clob columns should be set with "setCharacterStream()" instead of "setClob()". I don't know if I can change that, or if using "setClob()" could even work.

This sure seems like I'm seeing a bug in the JDBC driver.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 24 2007
Added on Sep 6 2007
4 comments
3,449 views