Title: Clob Issue
Is this with Oracle? If so, the string can only be up to 4000 characters long if you use setString even if the underlying column is a CLOB and you tell the driver that. With bigger strings, you need to use the CLOB-specific API stuff.
 
A nice workaround is to use the Oracle10g JDBC driver and set the following connection property:
 
SetBigStringTryClob=true;
 
Then, you can pass any size string to setString, and the JDBC driver will internally do the "clob" work. You can also define your maps using simply "string".
 
FYI - the Oracle10g driver works well with both Oracle9i and 10g databases. We support both DBs and make extensive use of clobs in our iBatis stuff.
 
Steve B.


From: Craig Swift [mailto:[EMAIL PROTECTED]
Sent: Thu 2005-08-11 3:33 PM
To: [email protected]
Subject: Clob Issue

Hello,

Has anyone seen this type of error before when trying to use Clobs in
IBatis?

javax.servlet.ServletException: Error executing update.  Cause:
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in recognition/dao/ibatis/mapping/Nomination.xml.
--- The error occurred while applying a parameter map.
--- Check the updateNomination-InlineParameterMap.
--- Check the parameter mapping for the 'writeUp' property.
--- Cause: java.sql.SQLException: Data size bigger than max size for this type: 4236

I'm using a String as the underlining object and specifying the JDBC type as a clob in the sql map. It works for inserts/updates/deletes until the String size becomes to large. I was under the impression that a CustomType Hnadler wasn't necessary. Any information would be appreciated, thanks!

Craig S



Reply via email to