-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: mapping between serializable to DB2 blob?
PostPosted: Wed Mar 08, 2006 3:01 pm 
Newbie

Joined: Wed Mar 08, 2006 2:42 pm
Posts: 1
i have a map attribute (jobData) in my class needs to be saved in database. here is the hbm.xml for this property:

<property
name="jobData"
type="serializable"
update="true"
insert="true"
access="property"
column="JOB_DATA"
/>

JOB_DATA in DB2 is a type of blob.

the problem is sometime it won't be saved in DB2, error message:

Caused by: com.ibm.db2.jcc.c.SqlException: The value of input host variable or parameter number "4" cannot be used because of its data type.
at com.ibm.db2.jcc.c.cl.d(cl.java(Compiled Code))
at com.ibm.db2.jcc.a.bd.k(bd.java(Compiled Code))
at com.ibm.db2.jcc.a.bd.a(bd.java(Compiled Code))
at com.ibm.db2.jcc.a.r.a(r.java(Inlined Compiled Code))
at com.ibm.db2.jcc.a.bq.c(bq.java(Compiled Code))
at com.ibm.db2.jcc.c.cm.F(cm.java(Inlined Compiled Code))
at com.ibm.db2.jcc.c.cm.c(cm.java(Compiled Code))
at com.ibm.db2.jcc.c.cm.C(cm.java(Compiled Code))

the wired thing is when i dropped this table and recreat it using the same schema, sometimes, it works. so what's wrong? thanks in advance!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.