Cause: java.lang.IllegalArgumentException: Result Maps collection contains value for com.angus.dao
2019-07-11 11:07
567 查看
错误如下,
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:\ideaworkspace\ssmdemo\target\classes\sqlMap\StudentMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection contains value for com.angus.dao.StudentMapper.BaseResultMap already
错误原因是
mybatis 的 ***Mapper.xml 文件里边有错误了。
org.springframework.beans.factory.BeanCreationException:
使用类路径资源中定义的名称为“sqlSessionFactory”创建bean时出错
(spring /中):
初始化方法调用失败;
嵌套异常是org.springframe .core. nestedioexception:
解析映射资源失败:'file
目标\ [E: \ ideaworkspace \ ssmdemo \ \ sqlMap \ StudentMapper.xml类)”;
嵌套异常是org.apache.ibatis.builder。BuilderException:错误解析映射器XML。
原因:java.lang.IllegalArgumentException:
Result Maps集合包含com.angus.dao.StudentMapper的值。
红色标出的部分,说明是xml文件出错。我是重新生成了一份。然后问题就解决了。
相关文章推荐
- jpa语句报 org.springframework.dao.InvalidDataAccessApiUsageException: Parameter with that position [2] did not exist; nested exception is java.lang.IllegalArgumentException: Parameter with that position
- Cause: java.lang.IllegalArgumentException:
- Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for …
- 修改mapper文件报错 Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException:
- Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value
- java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.dao
- Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for U
- MyBatis与Spring MVC结合时,使用DAO注入出现:Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
- Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already
- 错误提示:Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value
- Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already
- nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for
- failed in state INITED; cause: java.lang.IllegalArgumentException: Does not contain a valid host:por
- ### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value f
- failed in state INITED; cause: java.lang.IllegalArgumentException: Does not contain a valid host:por
- Cause: java.lang.IllegalArgumentException: argument type mismatch
- Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already
- ### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value f
- java.lang.IllegalArgumentException: name MUST NOT NULL! at org.nutz.dao.impl.NutDao.fetch
- Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already