tomcat启动报错:org.springframework.beans.factory.BeanCreationException
Web容器在启动时加载 spring 配置文件时解析xml失败常常引起容器启动失败。这次配置文件是 ibatis的sql脚本出了问题:
Context initialization failed
org.springframework. beans.factory. BeanCreationException:Error creating bean with name 'wlfDao' defined in file [applicationContext-wlf.xml]: Cannot resolve reference to bean 'sqlMapClient' while settling bean property 'sqlMapClient'; nested exception is org.springframework. beans.factory. BeanCreationException: Error creating bean with name 'sqlMapClient' defined in class path resource [applicationContext-datasource.xml]: Invocation of method failed; nested exception is java.lang.RuntimeException: Error occurred. Cause: com.ibatis. comm. xml.NodeletException:Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis. comm. xml.NodeletException: Error parsing XML. Cause: jave.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'. Cause: jave.util.NoSuchElementException
...
报错信息太多,就不一一贴出来了,而且错误信息没有把错误的根源显示出来,最终定位是另一个文件wlfSync.xml里的insert脚本中参数name少写了一个#:
<insert id='insert' parameterClass='wlfBean'> insert into t_wlf_task values (#objectid#,#name,#ruleid#) <insert>
最新文章
- [总结] Stack: Java V.S. C++
- SFTP CONFIGURATION IN FLASHFXP PROGRAM
- querySelectorAll 方法相比 getElementsBy 系列方法有什么区别
- Cocos2d-x源代码解析(1)——地图模块(3)
- AngularJS学习之旅—AngularJS 模块(十五)
- 企业级Docker-Harbor
- 《Windows核心编程》读书笔记 上
- windows系统安装
- 并发编程 —— ConcurrentHashMap size 方法原理分析
- 20、uwp打包失败(All app package manifests in a bundle must declare the same values under the XPath *[local-name()=&#39;Package&#39;]/*[local-name()=&#39;Dependencies&#39;])
- android数据恢复
- Springboot yml获取系统环境变量的值
- flexcan controller register
- The database cluster was initialized with RELSEG_SIZE 1048576, but the server was compiled with RELSEG_SIZE 8388608
- C++11空指针: nullptr
- express搭建权限管理系统
- poj 2553 The Bottom of a Graph(强连通、缩点、出入度)
- python请求带cookie
- 从头认识Spring-2.3 注解装配-@autowired(4)-required(2)
- BZOJ 1631 Usaco 2007 Feb. Cow Party