mybatis报错:Caused by: java.lang.IllegalArgumentException: Caches collection already contains value for com.crm.dao.PaperUserMapper
一、问题
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的更多相关文章
- springboot整合mybatis的时候报错Caused by: java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
今天闲来无事,学习springboot整合mybatis,在bilibili看视频学的,视频中在dao层的interface上面加上org.apache.ibatis.annotations.Mapp ...
- 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 ...
- 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 ...
- 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: ...
- 【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 ], ...
- 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 ...
- 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)提交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 ...
- 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 ...
随机推荐
- 安卓startActivityForResult用法
startActivityForResult的作用就是它可以回传数据,假如我们有两个页面A和B,点击A页面的一个按钮,进入下一个页面B,进入页面B后,进行设置操作,并在finish()或者back后, ...
- js发送post请求,实现下载文件
由于业务需求要下载文件的功能: <!DOCTYPE html> <html> <head> <meta charset="utf-8"&g ...
- [Swift]LeetCode764. 最大加号标志 | Largest Plus Sign
In a 2D grid from (0, 0) to (N-1, N-1), every cell contains a 1, except those cells in the given lis ...
- [Swift]LeetCode785. 判断二分图 | Is Graph Bipartite?
Given an undirected graph, return true if and only if it is bipartite. Recall that a graph is bipart ...
- [Swift]LeetCode835. 图像重叠 | Image Overlap
Two images A and B are given, represented as binary, square matrices of the same size. (A binary ma ...
- [Swift]LeetCode940. 不同的子序列 II | Distinct Subsequences II
Given a string S, count the number of distinct, non-empty subsequences of S . Since the result may b ...
- mybatis 详解------动态SQL
mybatis 详解------动态SQL 目录 1.动态SQL:if 语句 2.动态SQL:if+where 语句 3.动态SQL:if+set 语句 4.动态SQL:choose(when,o ...
- Redis面试题
1.谈谈Redis的主从复制流程 有几个重点:主节点负责写,从节点负责读,slave node 主要用来进行横向扩容,做读写分离,扩容的 slave node 可以提高读的吞吐量.必须开启 maste ...
- mysql怎么修改密码
第一种方式: 最简单的方法就是借助第三方工具Navicat for MySQL或Navicat Premium来修改,方法如下: 1.登录mysql到指定库,如:登录到student库. 2.然后点击 ...
- BBS论坛(三十一)
31.帖子加精和取消加精功能完成 (1)apps/models.py class HighLight(db.Model): __tablename__='highlight_post' id = db ...