我将xml作为字节数组存储在oracle数据库中的clob列中。现在尝试使用jdbctemplate在spring批中以字节数组的形式获得结果集,在异常下面抛出
org.springframework.dao.InvalidDataAccessApiUsageException:StatementCallback;SQL从cfg_report_list中选择DEFAULT_REPORT_PARAM_XML,其中report_name='Payments STP Report‘;不受支持的特性;嵌套的异常是java.sql.SQLFeatureNotSupportedException:不支持的特性
我正在使用的PFB代码示例
byte[] configxml = jdbcTemplate.queryForObject(
"select DEFAULT_REPORT_PARAM_XML from cfg_report_list where report_name='Payments STP Report'",
byte[].class);请注意,我使用的是春季批3.0.1版本.
请告诉我这个问题的解决办法。
谢谢
发布于 2016-06-13 23:13:32
不需要调用getBlob();您应该能够像这样简化如下:
byte[] configxml = jdbcTemplate.queryForObject(
"select DEFAULT_REPORT_PARAM_XML from cfg_report_list where report_name='Payments STP Report'",
(rs, rowNum) -> rs.getBytes(1));https://stackoverflow.com/questions/34174515
复制相似问题