count is ambiguous in Mapped Statements collection (try using the full name including the namespace, or rename one of the entries)


各位老鐵們: 遇到這種問題怎么辦?

{"callbackType":"","forwardUrl":"","message":":錯誤信息:底層異常,錯誤信息:數據庫底層異常,錯誤信息:數據操作失敗,錯誤信息:\r\n### Error querying database. Cause: java.lang.IllegalArgumentException: count is ambiguous in Mapped Statements collection (try using the full name including the namespace, or rename one of the entries)\r\n### Cause: java.lang.IllegalArgumentException: count is ambiguous in Mapped Statements collection (try using the full name including the namespace, or rename one of the entries)\ncom.etoak.demo.dao.TbTstCustomerDemoDao.findPage()[74行]

\r\ncom.etoak.demo.manager.TbTstCustomerDemoManager.findPage()[57行]
\r\ncom.etoak.demo.service.impl.CustomerdemoServiceImpl.findPage()[59行]
\r\ncom.etoak.demo.service.impl.CustomerdemoServiceImpl$FastClassByCGLIB$b96bb077.invoke()[-1行]
\r\ncom.etoak.demo.service.impl.CustomerdemoServiceImpl$EnhancerByCGLIB$66273b12.findPage()[-1行]
\r\ncom.etoak.demo.action.CustomerdemoAction.list()[91行]
\r\n\ncom.etoak.demo.manager.TbTstCustomerDemoManager.findPage()[60行]
\r\ncom.etoak.demo.service.impl.CustomerdemoServiceImpl.findPage()[59行]
\r\ncom.etoak.demo.service.impl.CustomerdemoServiceImpl$FastClassByCGLIB$b96bb077.invoke()[-1行]
\r\ncom.etoak.demo.service.impl.CustomerdemoServiceImpl$EnhancerByCGLIB$66273b12.findPage()[-1行]
\r\ncom.etoak.demo.action.CustomerdemoAction.list()[91行]

\r\n\ncom.etoak.demo.service.impl.CustomerdemoServiceImpl.findPage()[62行]
\r\ncom.etoak.demo.service.impl.CustomerdemoServiceImpl$FastClassByCGLIB$b96bb077.invoke()[-1行]
\r\ncom.etoak.demo.service.impl.CustomerdemoServiceImpl$EnhancerByCGLIB$66273b12.findPage()[-1行]
\r\ncom.etoak.demo.action.CustomerdemoAction.list()[91行]
\r\n\ncom.etoak.demo.action.CustomerdemoAction.list()[98行]
\r\n","navTabId":"020110","object":null,"pager":null,"statusCode":"300","tableId":"","totalSize":0}」
- - - - - - - - - - - - - - -

一般的大家第一時間想到的估計是

是不是重復了,但是檢查了一遍又一遍, count 不是一個sql的 id 啊。 這怎么會報這個錯誤呢,就開始糾結。

還有一種慶魁昂可能你沒有考慮到:

Mapper.xml沒有配置,或者命名空間錯誤,系統找不到相關的映射。

或者你的mapper文件沒有在mybatis的中得配置文件 的mapper 標簽中得resource 路徑中沒有。 制定的路徑掃描不到。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM