a.rubalcaba wrote:
> 
> I am currently working on a project using Spring + Ibatis.  DBA's have
> recently switched a varchar field into a CLOB field to support large
> Strings of data.  
> 
> My SQL map has the following
> 
>   <result property="filters" column="FILTER_DATA" jdbcType="CLOB"/>
> 
> which maps to a String object in my java class.
> 
> I can retrieve data ok. Its when I try to insert data that I get the
> following error.  
> 
> java.sql.SQLException: ORA-01704: string literal too long
> 
> I am using the classes12.jar JDBC driver, Ibatis  2.2.0, and Spring 2.0
> 
> Any help on this issue would be greatly appreciated. 
> 


I got rid of the ORA-01704: string literal too long error. My new issue is I
keep getting the following error.

--- Check the parameter mapping for the 'id' property.
--- Cause: java.sql.SQLException: Invalid column index

Here is my parameter Map:
<parameterMap class="chartFavoriteVO" id="chartParameter" >
<parameter property="id" javaType="int" jdbcType="NUMBER" />
<parameter property="chartName" javaType="string" jdbcType="VARCHAR2"/>
<parameter property="userId" javaType="string" jdbcType="VARCHAR2"/>
<parameter property="filters" jdbcType="CLOB" javaType="string"
typeHandler="org.springframework.orm.ibatis.suppor
t.ClobStringTypeHandler"/>
<parameter property="publicInd" javaType="string" jdbcType="CHAR"/>
<parameter property="groupBy" javaType="string" jdbcType="VARCHAR2"/>
<parameter property="chartType" javaType="int" jdbcType="NUMBER"/>
<parameter property="chartNotes" javaType="string" jdbcType="VARCHAR2"/>
<parameter property="measureData" javaType="string" jdbcType="VARCHAR2"/>
<parameter property="orderBy" javaType="string" jdbcType="VARCHAR2"/>
<parameter property="sortOrder" javaType="string" jdbcType="VARCHAR2"/>

</parameterMap>

Here is my insert

<insert id="insertChartFavorite" parameterMap="chartParameter">
insert INTO CHART_FAVS( FAV_ID, CHART_NAME, USER_ID,
FILTER_DATA,GROUPBY,PUBLIC_FLAG,CHART_TYPE,CHART_N
OTES,MEASURE_DATA,ORDER_BY,SORT_ORDER)
values ($id$,'$chartName$','$userId$','$filters$','$group
By$','$publicInd$',$chartType$,'$chartNotes$','$me
asureData$','$orderBy$','$sortOrder$')
</insert>

I'm trying to figureout what I'm missing and why I keep getting this error.
I tried removing some of the fields and inserting only the 3 needed fields
and that didn't work either.

-- 
View this message in context: 
http://www.nabble.com/Ibatis-CLOB-Support-tp22745185p22768773.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Reply via email to