I've always used an external JDBC DataSource or a previously configured connection with iBatis, so I'm not exactly sure. From glancing at the SimpleDataSource code, you should be able to set the property as is in the JDBC section of the config file and it should get passed to the DataSource create method and thereby be set in the driver. I would try adding this element to the <dataSource> element:
<transactionManager type="JDBC">
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="jdbc.oracle.OracleDriver"/>
...
<property name="SetBigStringTryClob" value="true"/>
</dataSource>
</transactionManager>
Someone can correct me if I'm wrong about that. The prop should pass through to
the driver.
Steve
-----Original Message-----
From: Nathan Maves [mailto:[EMAIL PROTECTED]
Sent: Thu 2005-08-11 6:29 PM
To: [email protected]
Subject: Re: Clob Issue
Steve,
How would one go about setting this property when using the jakarta
connection pool build into ibatis?
Nathan
On Aug 11, 2005, at 5:13 PM, Steve Biondi wrote:
> 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
>
>
>
>
<<winmail.dat>>
