org.apache.ibatis.builder.IncompleteElementException: Could not find result map org.seckill.dao.SeckillDao.Seckill

来源:4-8 DAO层单元测试编码和问题排查(上)

慕粉0003355598

2017-08-06 11:58

at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementResultMap(MapperBuilderAssistant.java:358)

at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:296)

at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:109)

at org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:718)

at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:688)

at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:683)

at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:183)

at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:44)

at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:59)

at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)

at com.sun.proxy.$Proxy13.queryById(Unknown Source)

at org.seckill.dao.SeckillDaoTest.queryById(SeckillDaoTest.java:27)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)

at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)

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)


写回答 关注

4回答

  • 人贩
    2017-11-13 18:22:45

    mapper 里没有找到 resultMap ,在 mapper 里加入

    <resultMap id="Seckill" type="Seckill">
       <id property="seckillId" column="seckill_id"/>
       <result property="name" column="name"/>
       <result property="number" column="number"/>
       <result property="createTime" column="create_time"/>
       <result property="startTime" column="start_time"/>
       <result property="endTime" column="end_time"/>
    </resultMap>

    qq_南瓜_...

    还是不行

    2018-05-19 12:23:59

    共 1 条回复 >

  • 郭亚坤
    2017-08-18 11:48:22

    这个错误怎么解决啊?我也遇到了

  • 慕粉0003355598
    2017-08-07 10:33:46

    嗯,是的。

  • 紫_羽
    2017-08-07 10:26:43

    是问报错的原因??


Java高并发秒杀API之业务分析与DAO层

Java实现高并发秒杀API的第一门课,还等什么,赶快来加入吧

87424 学习 · 496 问题

查看课程

相似问题