【JAVA】org.apache.ibatis.builder.IncompleteElementException: Could not find result map

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_17213067/article/details/79975336

关于报错:

org.apache.ibatis.builder.IncompleteElementException: Could not find result map XXX  

等等,都是由于你的Mybatis.xml中,有个resultMap="Map"导致;

只要有这个就会报错;

正确写法:resultType="java.util.Map" ///  resultType="Map"

阅读更多

Could not find result map

08-22

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

Could not find action or result

06-05

SSH框架遇到的问题,rn2009-6-5 3:05:48 org.apache.catalina.core.AprLifecycleListener initrn信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;E:\MyEclipse\myeclipse\eclipse\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_6.0.1.zmyeclipse601200710\tomcat\binrn2009-6-5 3:05:48 org.apache.coyote.http11.Http11Protocol initrn信息: Initializing Coyote HTTP/1.1 on http-8080rn2009-6-5 3:05:48 org.apache.catalina.startup.Catalina loadrn信息: Initialization processed in 625 msrn2009-6-5 3:05:48 org.apache.catalina.core.StandardService startrn信息: Starting service Catalinarn2009-6-5 3:05:48 org.apache.catalina.core.StandardEngine startrn信息: Starting Servlet Engine: Apache Tomcat/6.0.13rn2009-6-5 3:05:49 com.opensymphony.xwork2.util.logging.commons.CommonsLogger inforn信息: Parsing configuration file [struts-default.xml]rn2009-6-5 3:05:50 com.opensymphony.xwork2.util.logging.commons.CommonsLogger inforn信息: Unable to locate configuration files of the name struts-plugin.xml, skippingrn2009-6-5 3:05:50 com.opensymphony.xwork2.util.logging.commons.CommonsLogger inforn信息: Parsing configuration file [struts-plugin.xml]rn2009-6-5 3:05:50 com.opensymphony.xwork2.util.logging.commons.CommonsLogger inforn信息: Parsing configuration file [struts.xml]rn2009-6-5 3:05:51 org.apache.coyote.http11.Http11Protocol startrn信息: Starting Coyote HTTP/1.1 on http-8080rn2009-6-5 3:05:51 org.apache.jk.common.ChannelSocket initrn信息: JK: ajp13 listening on /0.0.0.0:8009rn2009-6-5 3:05:51 org.apache.jk.server.JkMain startrn信息: Jk running ID=0 time=0/31 config=nullrn2009-6-5 3:05:51 org.apache.catalina.startup.Catalina startrn信息: Server startup in 2663 msrn2009-6-5 3:05:53 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warnrn警告: Could not find action or resultrnThere is no Action mapped for namespace / and action name . - [unknown location]rn at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)rn at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)rn at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)rn at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:458)rn at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Unknown Source)rn

警告: Could not find action or result

04-15

我是刚开始学JSP,按照网上的一个视频教程写了这么个struts框架,却提示了很多错误,终于能在网页上看到了,还是上边这个错误rn警告: Could not find action or resultrnThere is no Action mapped for namespace / and action name showWords. - [unknown location]rn at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189)rn at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)rn at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)rn at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:475)rn at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)rn at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2441)rn at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2430)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)rn at java.lang.Thread.run(Thread.java:619)rn部分代码如下,求大神帮我解决下,非常感谢rnrnstruts.xmlrnrn rn rn rn /showWords.jsprn /inputWords.jsprn rn rn rnrn ShowWords.javarnpublic String execute()rn rn if("".equals(name))rn rn return INPUT; 视频里特意说明了要大写,后来我改成了小写,还是不对rn rn elsern rn words = "欢迎您:"+name;rn return SUCCESS;rn rn rnrninputWords.jsprn rn 请输入你的姓名: rn rn rnrn

Could not find action or result报错?

06-21

15:59:54,971 WARN org.apache.struts2.dispatcher.Dispatcher:49 - Could not find action or resultrnThere is no Action mapped for action name undefined. - [unknown location]rn一下为struts配置文件:rnrnrnrnrnrn rn rn rn rn rn rn rn /homePage/user/User_list.jsprn /homePage/homePage.jsprn /homePage/Login.jsprn /homePage/user/User_list.jsprn /homePage/user/User_view.jsprn /homePage/user/User_index.jsprn /homePage/user/User_index.jsprn /homePage/user/User_beforeUpdate.jsprn rn rn rn /homePage/assistance/Assistance_listByAddress.jsprn /homePage/assistance/Assistance_index.jsprn /homePage/assistance/Assistance_beforeUpdate.jsprn /homePage/assistance/Assistance_index.jsprn /homePage/assistance/Assistance_index.jsprn /homePage/assistance/Assistance_listByUser.jsprn /homePage/assistance/Assistance_statistic.jsprn rn rn rn /homePage/allowances/Allowances_listByAddress.jsprn /homePage/allowances/Allowances_index.jsprn /homePage/allowances/Allowances_beforeUpdate.jsprn /homePage/allowances/Allowances_index.jsprn /homePage/allowances/Allowances_index.jsprn /homePage/allowances/Allowances_listByUser.jsprn /homePage/allowances/Allowances_statistic.jsprn rn rn rn /homePage/old/Old_listByAddress.jsprn /homePage/old/Old_index.jsprn /homePage/old/Old_beforeUpdate.jsprn /homePage/old/Old_index.jsprn /homePage/old/Old_index.jsprn /homePage/old/Old_listByUser.jsprn /homePage/old/Old_statistic.jsprn rn rnrnrn以下为web配置文件:rnrnrnrnrn contextConfigLocationrn classpath:beans.xmlrn rn rn org.springframework.web.context.ContextLoaderListenerrn rn rn rn openSessionInViewrn org.springframework.orm.hibernate3.support.OpenSessionInViewFilterrn rn sessionFactoryBeanNamern sfrn rn rn rn rn openSessionInViewrn /*rn rn rn rn CharacterEncoding rn com.huxtech.action.SetCharacterEncodingFilter rn rn encoding rn utf-8 rn rn rn rn CharacterEncoding rn /* rn rnrn rn rn encodingFilterrn org.springframework.web.filter.CharacterEncodingFilterrn rn encodingrn UTF-8rn rn rn forceEncoding rn true rn rn rn rn rn encodingFilterrn /*rn rn rn rn rn struts2rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterrn rnrn rn struts2rn /*rn rn rn DWR Servletrn dwr-invokerrn org.directwebremoting.servlet.DwrServletrn rn debugrn truern rn rn rn dwr-invokerrn /dwr/*rn rn rn index.jsprn rnrn我登录成功返回jsp也对 但是就直接报上面的错误啦

Could not find action or result错误。。

04-20

异常信息:rnThere is no Action mapped for action name null. - [unknown location]rn at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189)rn at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)rn at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)rn at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:475)rn at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:619)rnrnstruts.xmlrnrnrnrnrn rn rn rn rn rn rn /login.jsprn rn rn /enroll.jsprn /login.jsprn rn rn rn /postMessages.jsprn rn rn AllPostActionrn rn rn /showPostMatter.jsprn rn rn /personalInfo.jsprn rn rn rn rn /manageOneselfPost.jsprn rn rn /login.jsprn rn rn /personalInfo.jsprn rn rn /updateUserInfo.jsprn rn rn Logoutrn rn rn rn /PostMatterActionrn $post.postIdrn rn rn rn AllPostActionrn ManageOneselfPostrn login.jsprn rn rn /uploadrn /cropper/testCropper.jsprn rn rn rn rn login.jsprn AllPostActionrn rn rn login.jsprn AllPostActionrn rn rnrnrnrnrn

Struts2.3+Spring3.2+hibernate4.2 Could not find action or result

06-22

Struts.xml中第二个package的action可以运行,但第一个package中的action运行总是报错:rnThere is no Action mapped for namespace [/control/center] and action name [main] associated with context path [/babasport]. - [unknown location]rnrn请各位老师指点指点rn下面是源码rnrnstruts.xml文件:rnrnrnrn rn rn rn rn /WEB-INF/page/controlcenter/default.jsprn rn rn /WEB-INF/page/controlcenter/top.jsprn rn rn /WEB-INF/page/controlcenter/menu.jsprn rn rn /WEB-INF/page/controlcenter/right.jsprn rn rn /WEB-INF/page/controlcenter/end.jsprn rn rnrn rn /WEB-INF/page/product/productList.jsprn rn rnrnrnrnrnaction文件:rn@Component("productType")rnpublic class ProductTypeAction extends ActionSupportrn private List type;rn private ProductTypeManage typeManage;rn public ProductTypeManage getProductTypeManage() rn return typeManage;rn rn public List getType() rn return type;rn rn public String listProType() throws Exceptionrn type = typeManage.find(1);rn return "list";rn rn @Resource(name="productTypeManageImpl")rn public void setProductTypeManage(ProductTypeManage productTypeManage) rn this.typeManage = productTypeManage;rn rn @Overridern public String execute() throws Exception rn return SUCCESS;rn rn public String left() throws Exceptionrn return "left";rn rn public String right() throws Exceptionrn return "right";rn rn public String end() throws Exceptionrn return "end";rn rn public String top() throws Exceptionrn return "top";rn rn public void setType(List type) rn this.type = type;rn rnrn

struts2.0 Could not find action or result

02-03

13:26:13,343 ERROR [Dispatcher] Could not find action or resultrnThere is no Action mapped for namespace / and action name HelloWorld. - [unknown location]rn at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)rn at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:494)rn at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:422)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)rn at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)rn at java.lang.Thread.run(Thread.java:595)rn/////////////////////////////////////////////////rnHelloWorld.javarnrnrnpackage bai;rnrnimport com.opensymphony.xwork2.ActionSupport;rnrnpublic class HelloWorld extends ActionSupportrnrn private UserBean users;rn rn public UserBean getUsers() rn return users;rn rnrn public void setUsers(UserBean users) rn this.users = users;rn rnrn @Overridern public String execute() throws Exception rn if(users.getUsername().equals("admin")&&users.getUserpwd().equals("admin"))rn return SUCCESS;rn elsern return ERROR;rn rn rn rn rn rn rnrnrnrnrnUserBean.javarnrnpackage bai;rnrnpublic class UserBean rn private String username;rn private String userpwd;rn rnpublic String getUsername() rn return username;rnrnpublic void setUsername(String username) rn this.username = username;rnrnpublic String getUserpwd() rn return userpwd;rnrnpublic void setUserpwd(String userpwd) rn this.userpwd = userpwd;rnrn rn rnrnrnstruts.xmlrnrnrnrnrnrn rnrn rn /bai/HelloWorld.jsprn /bai/error.jsprn rnrn rn rn rnrnrnrnweb.xmlrnrnrnrnrn Struts Blankrnrn rn struts2rn org.apache.struts2.dispatcher.FilterDispatcherrn rnrn rn struts2rn /*rn rnrn rn index.jsprn rnrnrnrnindex.jsprnrn<%@ page language="java" contentType="text/html; charset=ISO-8859-1"rn pageEncoding="ISO-8859-1"%>rn<%@ taglib prefix="s" uri="/struts-tags" %>rnrnrnrn rn Insert title herernrnrnrnrnrnrnrnrn

没有更多推荐了,返回首页