码迷,mamicode.com
首页 > 编程语言 > 详细

Spring MVC + mybatis项目错误解决方案汇总

时间:2015-05-28 16:15:43      阅读:302      评论:0      收藏:0      [点我收藏+]

标签:

1、启动tomcat时,报java.lang.ClassNotFoundException: org.springframework.web.util.IntrospectorCleanupListener错误,如下图:


技术分享


解决方法:项目 ->右键 -> 属性 -> Deployment Assembly -> add -> Java Build Path Entries -> next -> Maven Dependencies -> Finish ->Apply -> OK。


2、SAXParseException异常

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘personDao‘: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.graduation.dao.BaseDao.setMySqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory‘ defined in class path resource [conf/core/database.xml]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: org.xml.sax.SAXParseException; lineNumber: 21; columnNumber: 17; 元素类型为 "configuration" 的内容必须匹配 "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?,objectWrapperFactory?,plugins?,environments?,databaseIdProvider?,mappers?)"。

解决方法:一般是项目的xml配置文件语法错误,认真检查一下就可以了。




Spring MVC + mybatis项目错误解决方案汇总

标签:

原文地址:http://blog.csdn.net/u010723885/article/details/46123991

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!