只会逃避的小子
2016-09-05 00:36
严重: Servlet.service() for servlet ListName threw exception org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession. ### The error may exist in com/imooc/config/sqlxml/Message.xml ### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException: Element type "result" must be followed by either attribute specifications, ">" or "/>". at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23) at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:51) at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:35) at com.imooc.db.DBAccess.getSqlSession(DBAccess.java:19) at com.imooc.Dao.MessageDao.MessageQuery(MessageDao.java:25) at com.imooc.servicelist.ListService.MessageQuery(ListService.java:14) at com.imooc.Servlet.ListServlet.doGet(ListServlet.java:32) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) 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:619)
应该是缺少结尾符号什么的,就是标签书写的有问题
一样的问题怎么解决
result标签有问题,你看看是不是多写了,或者少写了内容,或者有空格之类的。
检查Message.xml配置是否有误,标点符号中英文区分、以及空格等,尤其是result属性附近
通过自动回复机器人学Mybatis---基础版
107412 学习 · 786 问题
相似问题