`
wpf523
  • 浏览: 23253 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

There is no result map named

阅读更多
Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'.  Cause: com.ibatis.sqlmap.client.SqlMapException: There is no result map named FunDocument.funDocument in this SqlMap.

错误的配置文件如下

<sqlMap namespace="FunDocument">

<typeAlias alias="funDocument" type="com.yc.ycportal.blockimp.domain.FunDocument"/>

<select id="selectFunDocumentBy" resultMap="funDocument" parameterClass="map">
  select * from fun_document where doc_id=#doc_id#
</select>

原来是没有引入ResultMap,所以不能用resultMap,只能改成resultClass="funDocument",平时引入了resultMap如下

<sqlMap namespace="ExtClass">

  <typeAlias alias="extclass" type="com.yc.ycportal.blockimp.domain.ExtClass"/>

  <resultMap id="extclassResult" class="extclass">
    <result property="blockid" column="block_id"/>
    <result property="etitle" column="etitle"/>
    <result property="evm" column="evm"/>
    <result property="edes" column="edes"/>
    <result property="eurl" column="eurl"/>
    <result property="height" column="height"/>
    <result property="width" column="width"/>
    <result property="border" column="border"/>
    <result property="style" column="style"/>
    <result property="scrolling" column="scrolling"/>
    <result property="singlogin" column="singlogin"/>

  </resultMap>

  <select id="getExtClassBy" resultMap="extclassResult">
    select block_id,etitle,evm,edes,eurl,height,width,border,style,scrolling,singlogin from yc_extclass where block_id=#value#
  </select>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics