• ibatis出现Mapped Statements collection already contains value for com.chong.model.AccountMapper.checkAccount错误


    1. Mapped Statements collection already contains value for com.chong.model.AccountMapper.checkAccount
    2. Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.chong.model.AccountMapper.checkAccount
    3. Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.chong.model.AccountMapper.checkAccount
    4. ### Error building SqlSession. ### The error may exist in com/chong/model/AccountMapper.xml ### The error occurred while processing mapper_resultMap[cc_account] ### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.chong.model.AccountMapper.checkAccount
    5. allAccounts
    6. Caught an exception while getting the property values of com.chong.action.AccountAction@451268
    7. Caught an exception while getting the property values of com.chong.action.AccountAction@451268 - Class: ognl.OgnlRuntime File: OgnlRuntime.java Method: getMethodValue Line: 1456 - ognl/OgnlRuntime.java:1456:-1re

    错误原因是由于使用ibatis的AccountMapper.xml实现接口AccountMapper.java中的方法的时候的id有重复的值,比如

     <select id="checkAccount"  parameterType="com.chong.model.Account" resultType="int">中的checkAccount在一个xml文件中有两个这样的id,修改过来即可

  • 相关阅读:
    我的扑克牌
    oc第二课
    oc入门第一课
    2014年1月3日
    iOS Navigation自定义设置Item
    iOS 在一个TableView内使用不同的Cell
    iOS 获取应用当前定位授权状态
    iOS 8显示应用角标
    Xcode 设置Pch文件
    iOS 8设置CLLocation授权
  • 原文地址:https://www.cnblogs.com/langtianya/p/2966491.html
Copyright © 2020-2023  润新知