Mapped Statements collection does not contain value for
程序员文章站
2022-07-15 12:22:49
...
问题:
Caused by: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.xxx.xxx.customer.component.dao.IPolicyCustomerDAO.select
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.xxx.xxx.customer.component.dao.IPolicyCustomerDAO.select
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)
at com.sun.proxy.$Proxy153.selectOne(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:166)
at com.zatech.octopus.module.mybatis.base.dao.AbstractBaseDaoImpl.queryOf(AbstractBaseDaoImpl.java:55)
... 39 more
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.xxx.xxx.customer.component.dao.IPolicyCustomerDAO.select
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.xxx.xxx.customer.component.dao.IPolicyCustomerDAO.select
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:149)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
... 42 more
解决方案:由于mapper.xml文件的namespace不对造成该映射找不到,所以报错
上一篇: PAT (Basic Level) Practice 1014
下一篇: Mapped Statements collection does not contain value for xxx
推荐阅读
-
moven 部署Sping与mybatis时,Mapped Statements collection does not contain value for Xxxxxxxx
-
Mapped Statements collection already contains value for xxx
-
Mybatis:Mapped Statements collection does not contain value for
-
Mapped Statements collection does not contain value for Xxxx
-
Mapped Statements collection does not contain value for XXX
-
Mapped Statements collection does not contain value for
-
Mapped Statements collection does not contain value for xxx
-
[email protected]使用报错:Mapped Statements collection does not contain value for XXX
-
mybatis错误 Mapped Statements collection does not contain value for
-
Mapped Statements collection does not contain value for