exclent! thanks
On Thu, Dec 4, 2008 at 09:04, Jeff Butler <[EMAIL PROTECTED]> wrote: > You don't have to use a resultMap. If you change the type of the > property in the bean to a byte array (byte[]) it should work > automatically. > > Jeff Butler > > > On Thu, Dec 4, 2008 at 5:55 AM, Betto McRose Gamarra <[EMAIL PROTECTED]> > wrote: >> thanks Jeff for your time >> >> 1. Blob >> 2. In my bean I used java.sql.Blob >> >> surfing a while in the internet I found a solution for this >> 1. use a resultMap >> 2. specify for imagen property >> javaType="[B" >> jdbcType="BLOB" >> >> On Wed, Dec 3, 2008 at 17:02, Jeff Butler <[EMAIL PROTECTED]> wrote: >>> 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 <[EMAIL PROTECTED]> >>> 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 >>>> >>> >> >> >> >> -- >> Betto McRose Gamarra >> IcarusDB >> "Soluciones Informáticas" >> Cel.: +595 992 686947 >> > -- Betto McRose Gamarra IcarusDB "Soluciones Informáticas" Cel.: +595 992 686947
