zoukankan      html  css  js  c++  java
  • 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>
  • 相关阅读:
    Redis 补充
    python 魔法方法补充(__setattr__,__getattr__,__getattribute__)
    Mongodb 补充
    Mysql补充
    HTML
    优秀工具
    优秀文章收藏
    MySQL
    爬虫
    Python
  • 原文地址:https://www.cnblogs.com/wuxun1997/p/6378117.html
Copyright © 2011-2022 走看看