SQL error while inserting data in Derby DB

天大地大妈咪最大 提交于 2019-12-11 14:25:22

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!