一、问题

eclipse启动时报下面的错误:

Caused by: java.lang.IllegalArgumentException: Caches collection already contains value for com.crm.dao.PaperUserMapper
    at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:782) ~[mybatis-3.2.7.jar:3.2.7]
    at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:754) ~[mybatis-3.2.7.jar:3.2.7]
    at org.apache.ibatis.session.Configuration.addCache(Configuration.java:516) ~[mybatis-3.2.7.jar:3.2.7]
    at org.apache.ibatis.builder.MapperBuilderAssistant.useNewCache(MapperBuilderAssistant.java:132) ~[mybatis-3.2.7.jar:3.2.7]
    at org.apache.ibatis.builder.xml.XMLMapperBuilder.cacheElement(XMLMapperBuilder.java:209) ~[mybatis-3.2.7.jar:3.2.7]
    at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:114) ~[mybatis-3.2.7.jar:3.2.7]
    ... 82 common frames omitted


二、解决

    a.检查命名空间、别名是否正确

    b.检查mapper.xml和mapper.java中是否有重复的

我这里是因为项目mapper.xml中出现重复的,修改后问题成功解决。小建议:把insert、select这些标签折起来,然后看看id属性是不是有重复的。


三、参考文献

https://blog.csdn.net/prader/article/details/80547010

https://blog.csdn.net/zengdeqing2012/article/details/46340357

mybatis报错:Caused by: java.lang.IllegalArgumentException: Caches collection already contains value for com.crm.dao.PaperUserMapper的更多相关文章

  1. springboot整合mybatis的时候报错Caused by: java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required

    今天闲来无事,学习springboot整合mybatis,在bilibili看视频学的,视频中在dao层的interface上面加上org.apache.ibatis.annotations.Mapp ...

  2. springcloud中config启动时候报错Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'config.info' in value "${config.info}"

    -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jm ...

  3. SpringBoot启动报:Caused by: java.lang.IllegalArgumentException: At least one JPA metamodel must be present!

    使用spring boot对项目改造,启动报错: Caused by: java.lang.IllegalArgumentException: At least one JPA metamodel m ...

  4. kettle添加hadoop cluster时报错Caused by: java.lang.IllegalArgumentException: Does not contain a valid host:port authority: hadoop:password@node56:9000

    完整报错是: Caused by: java.lang.IllegalArgumentException: Does not contain a valid host:port authority: ...

  5. 【spring boot】【elasticsearch】spring boot整合elasticsearch,启动报错Caused by: java.lang.IllegalStateException: availableProcessors is already set to [8], rejecting [8

    spring boot整合elasticsearch, 启动报错: Caused by: java.lang.IllegalStateException: availableProcessors ], ...

  6. tomcat使用cookies缓存的时候中文报错解决办法 java.lang.IllegalArgumentException: Control character in cookie value or attribute.

    报错出现 java.lang.IllegalArgumentException: Control character in cookie value or attribute. at org.apac ...

  7. javafx:JavaFX Scene Builder 2.0打开含有第三方jar包的fxml文件报错 Caused by: java.lang.ClassNotFoundException

    报错如下: java.io.IOException: javafx.fxml.LoadException: /C:/User.................test.fxml at com.orac ...

  8. 【原创】大叔问题定位分享(8)提交spark任务报错 Caused by: java.lang.ClassNotFoundException: org.I0Itec.zkclient.exception.ZkNoNodeException

    spark 2.1.1 一 问题重现 spark-submit --master local[*] --class app.package.AppClass --jars /jarpath/zkcli ...

  9. Feign调用远程服务报错:Caused by: java.lang.IllegalStateException: Method getMemberInfo not annotated with HTTP method type (ex. GET, POST)

    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ord ...

随机推荐

  1. Shell语言

    1.shell脚本规范以.sh结尾 2.运行 3.赋予权限,查询shell的执行过程 输出时间的 输出日历 输出一年的日历 修改语言 计算机 read –t 3 –p “1111111111”   # ...

  2. Mesos源码分析(2): Mesos Master的启动之一

    Mesos Master的启动参数如下: /usr/sbin/mesos-master --zk=zk://127.0.0.1:2181/mesos --port=5050 --log_dir=/va ...

  3. 【RL-TCPnet网络教程】第12章 TCP传输控制协议基础知识

    第12章      TCP传输控制协议基础知识 本章节为大家讲解TCP(Transmission Control Protocol,传输控制协议),通过本章节的学习,需要大家对TCP有个基本的认识,方 ...

  4. Nginx限流配置

    电商平台营销时候,经常会碰到的大流量问题,除了做流量分流处理,可能还要做用户黑白名单.信誉分析,进而根据用户ip信誉权重做相应的流量拦截.限制流量.Nginx自身有的请求限制模块ngx_http_li ...

  5. js 生成随机炫彩背景

    在浏览 https://ghost.org/xxxx/ 时. 可以使用 background-size: cover; 加上很小的像素图,放大后实现炫彩背景效果. 使用 js canvas 随机生成小 ...

  6. 查看和修改Linux服务器的时区和时间

    一.查看和修改Linux的时区1. 查看当前时区 命令 : "date -R" 2. 修改设置Linux服务器时区方法 A 命令 : "tzselect" 方法 ...

  7. [Swift]LeetCode26. 删除排序数组中的重复项 | Remove Duplicates from Sorted Array

    Given a sorted array nums, remove the duplicates in-place such that each element appear only once an ...

  8. [Swift]LeetCode378. 有序矩阵中第K小的元素 | Kth Smallest Element in a Sorted Matrix

    Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth ...

  9. [Swift]LeetCode919. 完全二叉树插入器 | Complete Binary Tree Inserter

    A complete binary tree is a binary tree in which every level, except possibly the last, is completel ...

  10. 优化之Source Qualifier组件

    勾选Select Distinct选项,该选项可去除重复记录,以此达到减少数据量从而提高性能 ----------------------------------------------------- ...