解决报错:IncompleteElementException: Could not find result map...

今天遇到这样一个报错,记录一下:

org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.xxx.manager.mapper.ItemMapper.Item

    at org.apache.ibatis.builder.MapperBuilderAssistant.getStatementResultMaps(MapperBuilderAssistant.java:346)
    at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:290)
    at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:109)
    at org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:788)
    at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:758)
    at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:753)
    at org.apache.ibatis.binding.MapperMethod$SqlCommand.resolveMappedStatement(MapperMethod.java:247)
    at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:217)
    at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48)
    at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:65)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58)
    at com.sun.proxy.$Proxy22.select(Unknown Source)
    at com.xxxx.manager.service.impl.BaseServiceImpl.getList(BaseServiceImpl.java:97)
    at com.xxxx.manager.service.impl.BaseServiceImpl$$FastClassBySpringCGLIB$$dae8e2b1.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
    at com.xxxx.manager.service.impl.ItemServiceImpl$$EnhancerBySpringCGLIB$$5180168e.getList(<generated>)
    at com.xxxx.manager.TestMybaitsMapper.testGetList(TestMybaitsMapper.java:30)
    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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.xxxx.manager.mapper.ItemMapper.Item
    at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:888)
    at org.apache.ibatis.session.Configuration.getResultMap(Configuration.java:640)
    at org.apache.ibatis.builder.MapperBuilderAssistant.getStatementResultMaps(MapperBuilderAssistant.java:344)
    ... 48 more

最后发现是:把 resultType 写成了 resultMap

哈哈,有点小尴尬...

原文地址:https://www.cnblogs.com/gongxin/p/8151163.html

时间: 2024-11-10 02:26:22

解决报错:IncompleteElementException: Could not find result map...的相关文章

Mybatis报错:org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.me.mybatis.mapper.OrderMapper.

运行关联查询的例子时报错: org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.me.mybatis.mapper.OrderMapper. at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementResultMap(MapperBuilderAssistant.java:346) at org.apache.

【工作经验】解决报错:SyntaxError: Unexpected token .

解决报错: SyntaxError: Unexpected token . 处理过程: 屏蔽全部新增改代码,问题不出现. 放开一部分,问题依然不出现. 直到把如下代码放开,报错出现,定位是这块的错误. var textDom.textContent=contentStr; 解决方案: 原来写代码时没注意,多了个var.删掉就好了.

coures包下载和安装 可解决报错ImportError: No module named &#39;_curses&#39;

http://blog.csdn.net/liyaoqing/article/details/54949253 coures curses 库 ( ncurses )提供了控制字符屏幕的独立于终端的方法.curses 是大多数类似于 UNIX 的系统(包括Linux)的标准部分,而且它已经移植到 Windows 和其它系统. 安装包   http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses 安装   pip install whl文件名 可以应对py

编写简单的shell脚本 - for循环 - 解决报错 Syntax error: Bad for loop variable

为了编写批量导入数据的程序,故而学习编写shell脚本!现学现用! ============================================ 1.第一个简单的for循环 #!/bin/bashfor i in 1 2 3 4;do echo $i;done 2.测试for的自增长的循环: #!/bin/bashfor ((i=1; i<=5; i++))do echo $i;done 如果会报错,没有则跳过: Syntax error: Bad for loop variable

解决报错:The server quit without updating PID file

今天晚上要做一个开启MySQL bin-log日志的变更. 在关闭数据库后,修改参数文件,在mysqld下加上(一定要在mysqld下加上),即可开启mysql的binlog日志 [mysqld] log-bin=mysql-bin 修改完参数后启动数据库,数据库无法启动,报一下错误: 参看错误日志发下一下信息: 参看服务器内存 发现已经小于4G 修改参数文件,把4G改为2G innodb_buffer_pool_size = 2G 重新启动数据库,启动成功. 通过此处解决报错的过程,在出现报错

vue 解决报错1

[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build. add resolve: { /**解决报错 [Vue warn]: You are using the run

解决报错Could not satisfy explicit device specification &#39;&#39; because the node was colocated with a group of nodes that required incompatible device &#39;/device:GPU:0&#39;

sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))改为如下:sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=True, log_device_placement=True)) 备注:allow_soft_placement=True表示当没有GPU实现可用时,使用将允许TensorFlow回退到CPU. 解决报错Could not sati

对小白操作Linux系统,解决报错的大概思路

有时候,看到报错,就马上到百度报错的原因,然后又报错,又到百度报错的原因 弄着弄着就不知道自己找的答案是解决之前哪个问题的了. 好,介绍一下linux各种报错的解决的大概思路,以加快我们的学习,工作效率 用纸记下: 报错的提示 解决报错的命令 报错的提示 解决报错的命令 如果一个报错在网上有多种解决报错的方法,可以以流程图分支形式几下来. 原文地址:https://www.cnblogs.com/yongshenwu/p/11785875.html

[已解决]报错: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: &#39;/Users/mac/Ana

报错代码: pip3 install gerapy 报错内容: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Users/mac/Ana 解决: sudo pip3 install gerapy [已解决]报错: Could not install packages due to an EnvironmentError: [Errno 13] Permission de