1. 程式人生 > >java.lang.IllegalArgumentException: Result Maps collection does not contain value for xxx.xxx.xxx

java.lang.IllegalArgumentException: Result Maps collection does not contain value for xxx.xxx.xxx

一、問題分析

Mybatis報錯:
java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.xxx.dao.BusinessDao.Business
簡單翻譯:resultMap 集合中不包含值為 Business的對映關係。即在xxx-mapper.xml
檔案中配置的所有<resultMap type="" id=""> 不包含id=”Business”的resultMap

二、問題解決

可能原因:
1、resultMap存在,在select語句中引用時不小心寫錯了名字

2、本來想用resultType,結果“腦殘了(說自己)”寫了resultMap

<select id="selectByPage" resultMap="Business">

唉,本來是想用Business這個java bean去接收值的,結果寫出了resultMap,當然不存在了,根本啊沒有配置id=”Business”的resultMap.

相關推薦

Mybatis java.lang.IllegalArgumentException: Result Maps collection does not contain value for com

 1.java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.model.User     解決:一、 當mapper XML檔案中存在 <r

Mybatis報錯:java.lang.IllegalArgumentException: Result Maps collection does not contain value for java

在練習Shiro的過程中,Mybatis報錯: 十二月 25, 2018 3:53:12 下午 org.apache.catalina.core.StandardWrapperValve invoke 嚴重: Servlet.service() for servlet [springmvc] i

java.lang.IllegalArgumentException: Result Maps collection does not contain value for xxx.xxx.xxx

一、問題分析 Mybatis報錯: java.lang.IllegalArgumentException: Result Maps collection does not contain value

java.lang.IllegalArgumentException: Result Maps collection does not contain value forcom.imooc.bean

org.apache.ibatis.exceptions.PersistenceException: ### Error querying database.  Cause: java.lang.I

spring整合mybatis bug解決java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for ...

post argument 出現 dao 結果 blog sta 出錯 lec spring整合mybatis時候出現了這個bug java.lang.IllegalArgumentException: Mapped Statements collection does

java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.bjsxt.mapper.PeopleMapper

報錯資訊: Type Exception Report Description The server encountered an unexpected condition that prevented it from fulfilling the request. Except

mybatis 異常Result Maps collection does not contain value for java.lang.String

提示 ati 都是 spring啟動 lang pos collect 異常 res Result Maps collection does not contain value for java.lang.String 以上是我報的錯。 只要報Result Maps c

mybatis報錯解決辦法 :Result Maps collection does not contain value for java.lang.String

錯誤 java.lang.IllegalArgumentException: Result Maps collection does not contain value for java.lang.String at org.apache.ibatis.session.Configura

mybatis 報錯Result Maps collection does not contain value for java.lang.Integer

重點:報錯的方法和xml檔案不一定是錯誤的位置,如果有多個xml檔案,必須檢查所有的檔案 搜尋  resultMap="java.lang.Integer"  找到對應的檔案,改為 resultType="java.lang.Integer"  1.檢查mybatis的

Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value

整合spring+mybatis 報錯以下錯誤: 我完全是IDEA的問題!!!找了半天啊!!! org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.wechat.mo

解決 Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value fo

前言:最近學習spring和mybatis的整合時遇到了一個問題( Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value fo

Result Maps collection does not contain value for錯誤解決

在用mybatis寫後臺程式時,可能會遇到以下錯誤 百度說的大部分是select語句引發的,而我是在執行insert語句時觸發了這個錯誤,檢查了mapper.java和mapper.xml檔案都沒發現錯誤,sql語句也正確,那麼問題出在哪裡呢,後來在一片博文看

SpringBoot Result Maps collection does not contain value for xxxx.int 的解決

在Mybatis中,返回的型別寫成resultMap="int",例如 <select id="getMessageTimes" resultMap="int" parameterType="com.bojia.fund.bean.Message"> select co

使用mybatis啟動報錯Result Maps collection does not contain value for的解決

在呼叫mapper方法後報錯: Result Maps collection does not contain value for java.lang.Integer 我檢查了下我的mapper.xml檔案,該方法是個insert方法,並沒有resultMa

Parameter Maps collection does not contain value for java.lang.String

java.lang.IllegalArgumentException: Parameter Maps collection does not contain value for java.lang.String   今天真是被這個報錯給氣炸了,費了我老大勁。哎,惹不起惹不起!

牽一髮而動全身 Parameter Maps collection does not contain value for java.util.HashMap 如何坑爹的

今天開發專案,費了不少勁終於寫好整套BUG,滿心歡喜的去測試,然後啟動tomcat,正常,開啟網站登入,Boom,炸的一臉懵逼,竟然登入不上去了,趕緊看控制檯,發現報了這個錯 Parameter Maps collection does not contain value f

解決了Mybatis中Parameter Maps collection does not contain value for xxx 的問題

parameterMap="moduleMap" 更改為parameterType="com.demo.sys.entity.Mo

[異常]Caused by: java.lang.IllegalArgumentException: Result Maps collection already contains value for

Caused by: java.lang.IllegalArgumentException: Result Maps collection already contains value for at org.apache.ibatis.session.Configuration$St

解決Mybatis--java.lang.IllegalArgumentException: Result Maps collection already contains value for XXX

感謝幻滅若水的部落格。 這兩天因為專案需要整合Spring、struts2、mybatis三大框架,但啟動的時候總出現這個錯誤,困擾我好久,在網上找到的答案都不是我想要的,今天終於知道原因了。     user-mapper.xml如下: 1 <?xml

Mapped Statements collection does not contain value for 問題的解決

invoke tde ping ret als bat find mvc lar 在做SSM項目的時候,遇到MyBatis拋出的一個異常: Mapped Statements collection does not contain value for org.lyk.vo.