ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harvey Kim" <cash...@fastmail.fm>
Subject Re: TypeHandlerCallBack javaType for byte[]
Date Fri, 14 Sep 2007 22:10:23 GMT
I have a generic Boolean type handler and I registered it this way:  

  <resultMap id="genericResultMap" class="GenericDTO" >
    <result property="id" column="id"/>
    <result property="yesNo" column="rqr_ind_cd"

It isn't a byte type converter but only thing different should be the
"getResult" method.

On Fri, 14 Sep 2007 14:32:25 -0700, Christopher.Mathrusse@sybase.com
> I'm writing a TypeHandlerCallback for my application, which is
> running against Sybase ASE. I'm trying to convert a Block (IMAGE
> or TEXT) field into a byte[]. If I allow iBatis to handle this
> with the default TypeConverter the Sybase JDBC driver raises an
> exception complaining that getBlob() cannot be called.
> The TypeHandler is rather simple as it simply reads the data as a
> BinaryStream. The problem that I'm having is registering it with
> iBatis in the sql-map-config file. While I know the JDBC type I
> can't seem to figure out how to tell iBatis that the Java type is
> a byte[].  If I specify byte[] iBatis raises an exception.
> java.lang.ClassNotFoundException: byte[]
> So how do I register this Type Handler?
> <typeHandler javaType="?" jdbcType="LONGVARCHAR"
> Thanks...

http://www.fastmail.fm - A fast, anti-spam email service.

View raw message