ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Kratz <jason.kr...@firm58.com>
Subject Re: Dealing with large CLOBs and Oracle 10g
Date Wed, 03 Sep 2008 17:50:54 GMT
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 <tendancer@gmail.com> 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.
>

Mime
View raw message