JustForAsa
JustForAsa
采纳率100%
2017-08-22 07:38 阅读 3.3k
已采纳

Could not find result map

严重: Exception sending context initialized event to listener instance of class org.agent.systeminit.SystemInit
org.apache.ibatis.builder.xml.IncompleteStatementException: Could not find result map org.agent.dao.user.UserMapper.userList
at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementResultMap(MapperBuilderAssistant.java:290)
at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:228)
at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:66)
at org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:504)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:435)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:430)
at org.apache.ibatis.binding.MapperMethod.setupCommandType(MapperMethod.java:188)
at org.apache.ibatis.binding.MapperMethod.(MapperMethod.java:51)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:24)
at $Proxy9.getSystemConfigsIsStart(Unknown Source)
at org.agent.service.systemconfig.SystemConfigServiceImpl.getSystemConfigsIsStart(SystemConfigServiceImpl.java:32)
at org.agent.systeminit.SystemInit.contextInitialized(SystemInit.java:37)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for org.agent.dao.user.UserMapper.userList
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:595)
at org.apache.ibatis.session.Configuration.getResultMap(Configuration.java:364)
at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementResultMap(MapperBuilderAssistant.java:288)
... 35 more
2017-8-22 15:34:24 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2017-8-22 15:34:24 org.apache.catalina.core.StandardContext start
严重: Context [] startup failed due to previous errors
2017-8-22 15:34:24 org.apache.catalina.core.ApplicationContext log

这个是什么问题啊,小白一脸懵逼。。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • 已采纳
    zhenglichenboy zhenglichenboy 2017-08-22 07:46

    1.如果你用的是mybaits 你就把resultMap 换成resultType就好了
    2.原因:org.agent.dao.user.UserMapper.userList 这明显是一个model,返回类型不能用 resultMap;
    只有你返回的类型在xml中配置了标签你才能用 resultMap并制定你配置的标签的id

    点赞 2 评论 复制链接分享
  • zhenglichenboy zhenglichenboy 2017-08-22 07:51

    补充上条:刚图片没发出去,用resultMap你的xml里得有 下图的配置
    图片说明

    点赞 评论 复制链接分享

相关推荐