Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already
錯誤資訊:
Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for org.hc.jiankunking.system.member.dao.OrderLogMapper.BaseResultMap; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [E:\16年檔案\JAVAdemo\jiankunking\jiankunking-web\target\jiankunking-web-1.0-SNAPSHOT\WEB-INF\classes\spring\spring-mybatis.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'URL [jar:file:/E:/16年檔案/JAVAdemo/jiankunking/jiankunking-web/target/jiankunking-web-1.0-SNAPSHOT/WEB-INF/lib/jiankunking-system-1.0-SNAPSHOT.jar!/mapper/OrderLogMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for org.hc.jiankunking.system.member.dao.OrderLogMapper.BaseResultMap
分析:
從錯誤提示資訊中可以看出,應該是OrderLogMapper.xml檔案有重複,mybatis識別不出來應該使用哪一個。
先在原始碼中看一下,發現沒有重複;然後到錯誤提示資訊中指明的:target/jiankunking-web-1.0-SNAPSHOT/WEB-INF/lib/jiankunking-system-1.0-SNAPSHOT.jar資料夾下搜尋一下,結果發現:
OrderLogMapper.xml真的有重複。
解決:
最簡單的方法就是直接刪除target檔案目錄下所有檔案即可,再次啟動idea的時候會重新生成。
作者:jiankunking 出處:http://blog.csdn.net/jiankunking
相關文章
- Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause:...ApacheBATUIExceptionErrorSQLAPP
- mabatis報錯 Result Maps collection already contains value for gamedataserver.dao.one.ChargeRecordMapper.BaseResultMapBATAIGAMServerAPP
- Result Maps collection already contains value for xxx.xxx.dao.BaseResultMap錯誤AI
- Springboot Error parsing Mapper XMLSpring BootErrorAPPXML
- Result Maps collection already contains value for com.xxx.xxxMapper.BaseResultMap問題解決AIAPP
- mybatis(錯誤) 專案啟動時報“Result Maps collection already contains value forxxx”的解決方案MyBatisAI
- Large result cache can cause sessions to spin -instance to hangSession
- One cause leads to the error(The specified nodes are not clusterable)Error
- java.lang.IllegalArgumentException: Mapped Statements collection does not contain value forJavaExceptionAPPAI
- EWM error 'Delivery is already fully invoiced'Error
- Error parsing HTTP request header--400 bad requestErrorHTTPHeader
- Oracle Database on NFS : unable to lock file - already in use" ErrorOracleDatabaseNFSError
- 解決 eslint 的 Parsing error: Unexpected token 錯誤EsLintError
- 急!!Error Parsing EJB file: Finder found in DD with no matching method.Error
- Q:[Vue warn]: Duplicate keys detected: ‘PAYACT‘. This may cause an update error.VueError
- 解決 java 實體中用 LocalDateTime 在轉換時候報錯 Error attempting to get column ‘XXX’ from result set. Cause: java.sql.JavaLDAErrorSQL
- VS error LNK2005:**already defined in **.objErrorOBJ
- vue報錯之Duplicate keys detected: '0'. This may cause an update error.VueError
- 360 Atals:Cause: java.sql.SQLException: Proxy Warning - near “status“: syntax errorJavaSQLExceptionError
- GitLab error: RPC failed; result=22, HTTP code = 413GitlabErrorRPCAIHTTP
- 解決mybatis出現Mapped Statements collection already contains value for問題MyBatisAPPAI
- PARSING_USER_ID,PARSING_SCHEMA_ID,PARSING_SCHEMA_NAME in V$SQLSQL
- Error parsing XML: An invalid XML character (Unicode:0x1f) was foundErrorXMLUnicode
- error LNK2005: already defined in libcmt.libError
- [轉]Android Studio匯入工程報錯 Error:Cause: peer not authenticated 解決方案AndroidError
- ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Coul...ErrorDatabaseSpringFrameworkJDBCOTGException
- com.badlogic.gdx.utils.SerializationException: Error parsing XML on line 1 nearExceptionErrorXML
- 《Effective Go》--MapsGo
- SQL Parsing Flow DiagramSQL
- Parsing an XML Document with XPathXML
- bind (ERROR 502): bind(0.0.0.0:8811) failed. Error: Address already in use [98] (埠被佔用)ErrorAI
- Swift 5.0 值得關注的特性:增加 Result<T, E: Error> 列舉型別SwiftError型別
- 2.3.7 Container MapsAI
- Google Maps 的故事Go
- parsing html in asp.netHTMLASP.NET
- 【MySQL】重放binlog故障一則 ERROR 1050 (42S01) : Table '' already existsMySqlError
- oninit -vy 出錯: Fatal error in shared memory creation 以及 shared memory already existsError
- vagrant up 啟動報錯 Stderr: VBoxManage.exe: error: A NAT rule of this name already existsError