ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: blob type support...
Date Wed, 03 Dec 2008 21:02:10 GMT
The error message states that the database type and the java type are
not compatible with iBATIS default type handling.

1. What is the DB field type for IMAGEN?
2. What is the Java type for the imagen property in the result class?

Jeff Butler

On Wed, Dec 3, 2008 at 8:17 AM, Betto McRose Gamarra <icarusdb@gmail.com> wrote:
> hi all
> this is the error trace:
> ==============
> Caused by: java.lang.RuntimeException: Error lazy loading result.
> Cause: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in
> py/com/sif/dna/sgc/persistence/sqlmap/sql/RevisionDocumento.xml.
> --- The error occurred while applying a result map.
> --- Check the RevisionDocumento.getRevisionDocumentoByDocumentoSgcId-AutoResultMap.
> --- Check the result mapping for the 'imagen' property.
> --- Cause: com.ibatis.sqlmap.client.SqlMapException: No type handler
> could be found to map the property 'imagen' to the column 'IMAGEN'.
> One or both of the types, or the combination of types is not
> supported.
>        at com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.loadObject(EnhancedLazyResultLoader.java:139)
>        at com.ibatis.sqlmap.engine.mapping.result.loader.EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl.invoke(EnhancedLazyResultLoader.java:120)
>        at $java.util.Set$$EnhancerByCGLIB$$b291e667.iterator(<generated>)
>
> this is sql statement:
> =============
>    <sql id="searchAll">
>        SELECT
>            RD.ID                AS id,
>            RD.ID_DOCUMENTO      AS idDocumento,
>            RD.REVISION          AS revision,
>            RD.FECHA_INGRESO     AS fechaIngreso,
>            RD.FECHA_INICIO_VIG  AS fechaInicioVigencia,
>            RD.IMAGEN            AS imagen,
>            RD.APROBADO          AS aprobado,
>            RD.ID_ULTIMO_USUARIO AS idUltimoUsuario,
>            RD.FECHA_ULTIMA_ACT  AS fechaUltimaAct,
>            RD.TRN               AS trn,
>            SGC.NOMBRE           AS nombreDocumento,
>            SGC.ESTADO           AS estadoCode,
>            INFO.ABREVIATURA     AS estadoAbreviatura,
>            INFO.DESCRIPCION     AS estadoDescripcion
>
>        FROM REVISION_DOCUMENTO RD,
>             DOCUMENTO_SGC SGC,
>             INFO_REF_OPC INFO
>
>        WHERE RD.ID_DOCUMENTO = SGC.ID
>          AND SGC.ESTADO = INFO.ID
>    </sql>
>
>    <select id="getRevisionDocumentoByDocumentoSgcId"
> resultClass="revisionDocumento"
>            parameterClass="java.lang.Long" >
>            <include refid="RevisionDocumento.searchAll"/>
>            AND SGC.ID = #id#
>    </select>
>
> everything else not showed like class name are correctly defined
>
> as you can see in my <select /> I use resultClass and not resultMap
>
> so, What do I do ?
>
>
> --
> Betto McRose Gamarra
> IcarusDB
> "Soluciones Informáticas"
> Cel.: +595 992 686947
>

Mime
View raw message