steve wrote:
What is the database/JDBC type it is trying to map as InputStream?
Steve, I am having this exact problem using middlegen and hibernate r5 plugin. This occurs when the source database is MySQL 5.0.1-alpha using mysql-connector-java-3.1.3-beta-bin.jar. The datatype of the field is longblob.
The generated hbm for this field is:
Code:
<property
name="thedata"
type="java.io.InputStream"
column="thedata"
not-null="true"
length="2147483647"
/>
The generated class attribute and accessors are:
Code:
/** persistent field */
private InputStream thedata;
public InputStream getThedata() {
return this.thedata;
}
public void setThedata(InputStream thedata) {
this.thedata = thedata;
}
The exception occurs when trying to use the object. I have used both hibernate versions 2.1.4 and 2.1.6.