ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: mode="INOUT" with custom type handler
Date Wed, 20 Dec 2006 20:45:16 GMT
Hmm, jdbcType="DATERANGETYPE" should not work at all. I am surprised
it doesn't blow up...it probably should. ;-)

You may want to try jdbcType="OTHER" or "STRUCT" instead - it should
be something from java.sql.Types.

Larry


On 12/20/06, Tegan Clark <tegan.clark@yahoo.com> wrote:
>
>
> Hi Group,
>
>
> I've successfully implemented a custom type handler to handle an Oracle
> custom type.  All works just fine as long as my custom type is registered as
> mode="IN".  In Oracle it's actually an INOUT.  As soon as i change the mode
> to INOUT in my map I get a "Invalid column type" from iBATIS when it types
> to map the parameters.  My type handler never gets called, so the problems
> not in there (I think).
>
> Here's the snippet of the map:
>
>     <parameterMap id="listErrorByClientSummaryParameters"
> class="java.util.Map">
>         <parameter property="report.dateRange"
> javaType="com.sc.domain.report.DateRange" jdbcType="DATERANGETYPE"
> mode="INOUT"/>
>
> And the registration in the config:
>
>     <typeHandler javaType="com.sc.domain.report.DateRange"
> jdbcType="DATERANGETYPE"
> callback="com.sc.dal.reportBuilder.ibatis.typeHandler.DateRangeTypeHandler"
> />
>
> Changing to INOUT throws me:
>
>  The error occurred in
> com/sc/dal/reportBuilder/ibatis/errorLogSummaryReport-map.xml.
>
>  The error occurred while executing query procedure.
>  Check the {call all_error_pkg.listErrorByClientSummary()}.
>
>  Check the output parameters (register output parameters failed).
>  Cause: java.sql.SQLException: Invalid column type; nested exception is
> com.ibatis.common.jdbc.exception.NestedSQLException:
>  The error occurred in
> com/aptare/sc/dal/reportBuilder/ibatis/errorLogSummaryReport-map.xml.
>
>  The error occurred while executing query procedure.
>  Check the {call all_error_pkg.listErrorByClientSummary()}.
>
>  Check the output parameters (register output parameters failed).
>  Cause: java.sql.SQLException: Invalid column type
>
> I read Oracle can throw this if you set a null on a column that doesn't have
> a type set, but I'm pretty sure I'm not in that boat.
>
> Anyone on the list had any similar experiences?
>
> All help greatly appreciated.
>
> Tegan
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com

Mime
View raw message