当前位置: 代码迷 >> Java Web开发 >> org.springframework.jdbc.UncategorizedSQLException:   SqlMapClient  
  详细解决方案

org.springframework.jdbc.UncategorizedSQLException:   SqlMapClient  

热度:393   发布时间:2016-04-17 15:22:00.0
ibatis +spring 返回list 错误
ibatis   层配置
<!--   指标项操作   -->
<select   id= "getReportTarget "   parameterClass= "ReportTarget "   resultClass= "ReportTarget ">
select  
RTID   as   targetID,RID   as   reportID,JCDM   as   targetCode,Title   as   title,TitlePre   as   titlePre,TitlePost   as   titlePost,Note   as   note

from  
XNW_REPORT_TARGET
<dynamic   prepend= "where ">
<isNotEmpty   property= "targetID "   prepend= "and ">   RTID   =   #targetID#   </isNotEmpty>
<isNotEmpty   property= "reportID "   prepend= "and ">   RID   =   #reportID#   </isNotEmpty>
</dynamic>
</select>

sql语句正确
当有值返回时   报错如下

org.springframework.jdbc.UncategorizedSQLException:   SqlMapClient   operation;   uncategorized   SQLException   for   SQL   [];   SQL   state   [null];   error   code   [0];   ---   The   error   occurred   in   db/report/sqlmap_report_def.xml.   ---   The   error   occurred   while   applying   a   result   map.

------解决方案--------------------
Mapping的时候出错,看看实体对象的属性是否和你xml里面定义的匹配?
  相关解决方案