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!
|