A query was run and no Result Maps were found for the Mapped Statement
mybatis测试方法报错:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'com.xxx.mapper.ExamReportStuMapper.findReportStuIsNotAuto'. It's likely that neither a Result Type nor a Result Map was specified.
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:79)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:447)
at com.sun.proxy.$Proxy96.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:231)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:128)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:68)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
at com.sun.proxy.$Proxy155.findReportStuIsNotAuto(Unknown Source)
at com.xxx.service.ReportManagerHandleService.findReportStuIsNotAuto(ReportManagerHandleService.java:145)
at com.xxx.service.ReportManagerService.saveReportStuIsAuto(ReportManagerService.java:1134)
at com.xxx.service.ReportManagerService$$FastClassBySpringCGLIB$$c2c6d683.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:651)
at com.xxx.service.ReportManagerService$$EnhancerBySpringCGLIB$$194b4ca.saveReportStuIsAuto(<generated>)
at com.xxx.RegionMapperTest.findTReportsaveReportStuIsAuto(RegionMapperTest.java:51)
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:497)
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.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
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.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
报错是由于使用mybatis进行查询时,没有给定resultType值出现的错误。resultType是查询对象的类型。
<!-- 参数 long testId, int is_auto-->
<select id="findxxx" parameterType="Map" resultMap="BaseResultMap">
SELECT id_generator() id,stu_id,test_id,...</select>
A query was run and no Result Maps were found for the Mapped Statement的更多相关文章
- A query was run and no Result Maps were found for the Mapped Statement 'user.insertUser!selectKey'. It's likely that neither a Result Type nor a Result Map was specified.
使用mybatis时出现异常问题: 有如下的错误 Error querying database. Cause: org.apache.ibatis.executor.ExecutorExceptio ...
- 出错:Cause: org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'cn.mgy.mapper.UserMapper.findById'.
详细出错代码: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.a ...
- mybatis使用map传递多参数报错:A query was run and no Result Maps were found for the Mapped Statement
在使用mybatis进行多参数传递时,报错: A query was run and no Result Maps were found for the Mapped Statement 'xx.xx ...
- ExecutorException: A query was run and no Result Maps were found for the Mapped Statement ‘com.win.mall.dao.CartMapper.test’. It’s likely that neither a Result Type nor a Result Map was specified.
ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'com.win.m ...
- mybatis报错:A query was run and no Result Maps were found for the Mapped Statement、、Property [login_ip] not found on type [com.thinkgem.jeesite.common.permission.entity.PremissUser]问题解决
今天在做ssm项目的时候出现了: 先是出现 了错误: mybatis报错:A query was run and no Result Maps were found for the Mapped St ...
- mybatis报错:A query was run and no Result Maps were found for the Mapped Statement
转自:https://blog.csdn.net/u013399093/article/details/53087469 今天编辑mybatis的xml文件,出现如下错误: 程序出现异常[A quer ...
- mybatis配置文件xxxx.xml中缺失返回类型的后果A query was run and no Result Maps were found
使用mybatis时出现异常问题: 有如下的错误 Error querying database. Cause: org.apache.ibatis.executor.ExecutorExcepti ...
- A query was run and no Result Maps were found for...原来是mapper.xml文件出了问题,是使用MyBatis最常见的一种错误
今天遇到一个问题,原来是mapper.xml文件出了问题,是使用MyBatis最常见的一种错误 报错的结果是这样的: A query was run and no Result Maps were f ...
- java.lang.IllegalArgumentException: Result Maps collection does not contain value for java.lang.Integer
今天做springmvc+mybatis+spring的项目的时候发现了一个异常.如下: org.apache.ibatis.builder.IncompleteElementException: C ...
随机推荐
- oracle学习笔记(十八) PL/SQL 游标
游标 说明 查询结果的光标,相当于java中的一个迭代器,方便遍历操作 可使用的属性 %FOUND SQL语句查询或影响了一行或多行时为 TRUE.如:mycursor%FOUND %NOTFOUND ...
- nikto---基本使用
目录 一:基本使用 二:调节扫描过程 三:命令行选项 四:配置文件 注意:使用版本:Nikto v2.1.6 功能:Web服务器评估工具,目的在于查找任何类型的Web服务器的各种默认和不安全的文件,配 ...
- Python【day 15-3】函数部分
'''''' ''' 一.函数 1.函数定义 对功能或者动作的封装 在类中定义,就是方法 在类之外定义,就是函数 2.函数写法 1.定义或者申明函数 def 函数名(形参列表): 函数体(return ...
- 易优CMS:关于assign你知道多少
[基础用法] 名称:assign 功能:模板文件中定义变量,可在其他标签里使用该变量 语法: {eyou:assign name='typeid' value='5' /} 文件: 无 参数: nam ...
- 这可能最简单的一种PS图片特效,零基础小白教程
不少小伙伴都想学习PS,可是又觉得PS很难,学了一段时间却还是做不出什么惊艳的效果,没关系!小编今天就来教大家做一个超级简单的图片特效,就算是小白也能轻松学会!我们先来看看图片效果~ 想知道怎么做吗? ...
- WC个人项目
一.Github项目地址: https://github.com/JakeYi/WC 二.PSP表格 PSP2.1 Personal Software Process Stages 预估耗时(分钟) ...
- dijit/_WidgetBase
英文地址:http://dojotoolkit.org/reference-guide/1.10/dijit/_WidgetBase.html 介绍 dijit/_WidgetBase是Dijit包中 ...
- 5G浪潮来袭,程序员在风口中有何机遇
导读:本文共2894字,预计阅读时间为9分钟.通过阅读本文,你将了解到5G的优势.即将燃爆的领域以及程序员在快速发展的5G产业中所需关注的技术. 5G时代已经来临 随着中美5G主导权之战的持续发酵,5 ...
- Java学习笔记(1)--- 简介
简介: 注:和之前的C不一样,本人没有学过java,所以内容上可能会相对详细一些. 主要特性: 1.这跟c++一样是面对对象语言: Java语言提供类.接口和继承等面向对象的特性,为了简单起见,只支持 ...
- Html学习之十三(导航栏的制作)
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...