使用Spring MVC从Postgresql数据库中获取图像

时间:2019-03-28 06:35:53

标签: java spring postgresql exception model-view-controller

我使用MultipartFile模型上传了图像,但是从数据库获取上传的图像时发生了异常。我无法查明原因:

INFO: SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase, Hana]

Mar 27, 2019 7:29:14 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [SpringMvcUser] in context with path [/SpringMvcUser] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [select image from product where barcode=?]; Bad value for type long : \xffd8ffsdfsdfsf4w4567(more text)

0 个答案:

没有答案