Wasn't trying to be flippant with the "google it" ;) Was out of the office. Java Strings can only hold 32k. The 10g driver gets around that but you definitely need to use the 10g driver. You didnt indicate which one you're using.

Jason

On Sep 3, 2008, at 12:50 PM, Jason Kratz wrote:

Google it. There is support in the 10g driver for this but requires some special setup.

Jason

Sent from my iPhone

On Sep 3, 2008, at 12:24 PM, Paul Sanders <[EMAIL PROTECTED]> wrote:


We recently upgraded our databases from 9i to 10g and now we are running into a problem when fetching rows containing large CLOBs. Here's a snippet of our
resultMap:

<resultMap class="Audit" id="fetch-audit-events-map">
     <result property="oldData" columnIndex="12" jdbcType="CLOB"/>
     <result property="newData" columnIndex="13" jdbcType="CLOB" />
</resultMap>

OLDDATA and NEWDATA are both defined as CLOB in the table.

Queries that used to work before now fail with an Oracle error:

org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation;
uncategorized SQLException for SQL []; SQL state [99999]; error code
[22835]; --- The error occurred in
com/sony/playstation/scert/mediuscentral/persistence/maps/ AuditMap.xml. ---
The error occurred while applying a parameter map. --- Check the
search-audit-events. --- Check the output parameters (retrieval of output parameters failed). --- Cause: java.sql.SQLException: ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 5548, maximum:
4000) ; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in com/sony/playstation/scert/mediuscentral/persistence/maps/ AuditMap.xml.
--- The error occurred while applying a parameter map. --- Check the
search-audit-events. --- Check the output parameters (retrieval of output parameters failed). --- Cause: java.sql.SQLException: ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 5548, maximum:
4000)

Some research reveals that in 9i a CLOB was truncated to 4000 chars when converted to a string, but in 10g it now throws an Oracle exception. Since it is iBatis that is doing the conversion I don't know how to start going
about fixing this - anyone got any ideas?

Thanks

Paul

--
View this message in context: 
http://www.nabble.com/Dealing-with-large-CLOBs-and-Oracle-10g-tp19293940p19293940.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Reply via email to