ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curro <fcopa...@gmail.com>
Subject Re: Problem with DB2 and BLOB!!
Date Wed, 02 Jan 2008 07:49:15 GMT
Hi and happy new year for everyone...

This is one of the querys that is failing

<resultMap id="imagenModel" class="beans.ImagenModelBean">
 <result property="idImagen"   column="ID_IMAGEN" />
 <result property="cdgoTipoImagen"  column="CDGO_TIPO_IMG"/>
 <result property="fileName"   column="FILE_NAME"/>
 <result property="contentType"   column="CONTENT_TYPE"/>
 <result property="length"   column="LENGTH"/>
 <result property="imagenBlob"   column="IMAGEN" jdbcType="BLOB"/>
 <result property="idModelo"   column="ID_MODELO" />
</resultMap>

<sql id="getImagen">
 SELECT
  imagen.ID_IMAGEN,
  imagen.CDGO_TIPO_IMG,
  imagen.FILE_NAME,
  imagen.CONTENT_TYPE,
  imagen.LENGTH,
  imagen.IMAGEN
</sql>

<select id="getImageByPk" parameterClass="beans.ImagenModelBean"
resultMap="imagenModeloCoche">
 <include refid="getImagen"/>
 FROM
  schema.T_IMAGES imagen,
      schema.T_MODELS modelo
      LEFT OUTER JOIN schema.T_MODEL_PZ as clase
       ON modelo.CDGO_CLASE_PLZ = clase.CDGO_CLASE_PLZ
 WHERE
  imagen.ID_IMAGEN = $idImagen$
  AND imagen.ID_MODELO = modelo.ID_MODELO
</select>

The only error code that i have is this:  SQL state [FFFFF]; error code
[-4];
I hope that anyone can help me.

Thanks.


2007/12/18, Abhigyan Agrawal1 <abhigyan_agrawal@in.ibm.com>:
>
> Hi,
>      To solve the problem, I will require the error code and the query
> that is failing. All other queries without BLOB (in same table) are
> working
> in both, right?
>
> Cheers,
> Abhigyan Agrawal
>
>
>
>
>
>             Curro
>             <fcopavon@gmail.c
>             om>                                                        To
>                                       user-java@ibatis.apache.org
>             17/12/2007 14:30                                           cc
>
>                                                                   Subject
>             Please respond to         Problem with DB2 and BLOB!!
>             user-java@ibatis.
>                apache.org
>
>
>
>
>
>
>
>
> Hi,
>
> I have a problem with all the querys that work with BLOB data in DB2 v8.1.
> In my local site (Windows) works fine, but in production (Unix) don't
> work,
> this is the log error:
>
>
> ---> SqlMapClient operation; uncategorized SQLException for SQL []; SQL
> state [FFFFF]; error code [-4];
>
>
>         --- The error occurred in mySqlMap.xml.
>
>
>         --- The error occurred while executing query.  .
>
>
>         --- Check the SQL Statement (preparation failed).
>
>
>         --- Cause: java.sql.SQLException: DB2JDBCCursor Received Error in
> Method describe:RETURN CODE==> -4 SQLSTATE ==> FFFFF Error Tokens ==>
> <<DB2
> 8.1 SQLJ/JDBC>> ; nested exception is
> com.ibatis.common.jdbc.exception.NestedSQLException :
>
>
> I'm using ibatis 2.3.0.677
>
> Any idea?
>
>

Mime
View raw message