ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AbelGG <abel...@terra.es>
Subject Re: Insert oracle BLOB's with iBatis
Date Thu, 25 Sep 2008 06:22:44 GMT

Hi! In reply to my own post I've discovered my problem. It was in the code
generated by abator; in the instruction "insert" puts the function nvl in
all columns, including the BLOB column and this is causing, attempting to
insert a NUMBER instead of a BLOB (BINARY). I don't know why but seems that
nvl function don't handle well the BLOB datatype.

PD: Sorry for the 3 posts I don't know why it has happened I don't wrote 3
posts equals.


AbelGG wrote:
> Hi!, I've a DB Oracle 9i and I want to insert a BLOB using iBatis. I've
> mapped a BLOB column as follows:
> <result column="FICHERO" jdbcType="BLOB" property="fichero" javaType="[B"
> />
> The java class that I mapped here has the property "fichero" as byte[]
> with getter's and setter's.
> The iBatis versión that I'm using is 2.3.0 and the oracle driver
> ojdbc14.jar (is the version from Oracle 10g Release 2 because I read that
> 9i's version had errors and I have to use the latest ojdbc14.jar although
> it was not the version for Oracle 9i).
> When I try to insert a BLOB it failed and tell me the follow:
> java.sql.SQLException: ORA-00932: inconsistent datatypes: expected BINARY
> got NUMBER.
> I tried to use a typeHandler in the mapping:
> typeHandler="org.springframework.orm.ibatis.support.BlobByteArrayTypeHandler"
> . But the result is the same.
> ¿Can anyone help me? Thanks. 

View this message in context: http://www.nabble.com/Insert-oracle-BLOB%27s-with-iBatis-tp19623712p19663720.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

View raw message