没有在xml中引入 相关的配置文件
Posted StriveSun
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了没有在xml中引入 相关的配置文件相关的知识,希望对你有一定的参考价值。
错误信息如下
严重: Servlet.service() for servlet AutoReplyServlet threw exception
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for Command.queryCommandList
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for Command.queryCommandList
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
at com.hs.dao.CommandDao.queryCommandList(CommandDao.java:36)
at com.hs.service.QueryService.queryByCommand(QueryService.java:41)
at com.hs.servlet.AutoReplyServlet.doGet(AutoReplyServlet.java:24)
at com.hs.servlet.AutoReplyServlet.doPost(AutoReplyServlet.java:32)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for Command.queryCommandList
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:797)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:631)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:624)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107)
... 19 more
缺少下图中的配置
以上是关于没有在xml中引入 相关的配置文件的主要内容,如果未能解决你的问题,请参考以下文章