【发布时间】:2018-12-21 09:02:39
【问题描述】:
我已将 pdf 文件保存在数据库中。当我得到它时,请查看错误。
@Lob
@Basic(fetch = FetchType.LAZY)
@Column(name = "CONTENT", nullable = false)
private Blob content;
....
SEVERE: Servlet.service() for servlet [dispatcher] in context with path [/libsmanager] threw exception [Request processing failed; nested exception is org.hibernate.PropertyAccessException: Could not set field value [com.mysql.jdbc.Blob@65bb08cc] value by reflection : [class com.quangdat.entities.TrialBook.content] setter of com.quangdat.entities.TrialBook.content] with root cause
java.lang.IllegalArgumentException: Can not set com.mysql.jdbc.Blob field com.quangdat.entities.TrialBook.content to com.sun.proxy.$Proxy222
【问题讨论】:
标签: java spring hibernate blob