I am using an informix database and I have two tables; instance and contact. Contact table has the following fields; contact_id, fname and lname. Instance table has the following fields, instance_id, name and contact_ids(contact_ids is an informix set collection of contact ids, com.informix.jdbc.IfxCollection@429681e8). I use hibernate for data persistence. The code for my Instance Class looks like this:
@Entity
public class Instance{
@Id
private int instance_id;
private String name;
@Lob
private Set<Integer> contact_ids
....
setters and getters
}
Contact Class:
@Entity
public class Contact{
@Id
private int contact_id;
private String fname;
private String lname;
....
setters and getters
}
When I load an Instance Entity I get the following error:
20:32:18,527 ERROR [jsp:154] java.sql.SQLException: **Can't convert to: binary stream**
at com.informix.util.IfxErrMsg.getSQLMinorException(IfxErrMsg.java:575)
at com.informix.jdbc.IfxObject.toBlob(IfxObject.java:647)
at com.informix.jdbc.IfxResultSet.getBlob(IfxResultSet.java:3338)
at com.informix.jdbc.IfxResultSet.getBlob(IfxResultSet.java:3437)
I simply want to retrieve the set.