问题
I am getting this:
SQLDataException:"java.sql.SQLDataException: An attempt was made to get a data value of type 'VARBINARY' from a data value of type 'BLOB' at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) ~[derbyclient-10.12.1.1.jar:na]"
I would appreciate if anyone has insights on this.
回答1:
This is issue is resolved after doing following:
@Basic
@Column(name = "PARSED_DATA")
@Lob
public byte[] getParsedData() {
return parsedData;
}
Since, table column is BLOB type.This is only issue with Derby.
来源:https://stackoverflow.com/questions/35070659/sql-error-while-inserting-data-in-derby-db