zoukankan      html  css  js  c++  java
  • Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

    严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.neusoft.util.AddSoapHeader] for bean with name 'addSoapHeader' defined in ServletContext resource [/WEB-INF/config/cxf-client.xml]; nested exception is java.lang.ClassNotFoundException: com.neusoft.util.AddSoapHeader
    at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:306)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1146)
    ...省略...
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.neusoft.util.AddSoapHeader] for bean with name 'addSoapHeader' defined in ServletContext resource [/WEB-INF/config/cxf-client.xml]; nested exception is java.lang.ClassNotFoundException: com.neusoft.util.AddSoapHeader
    at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1281)
    ...省略...
    at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:303)
    ... 25 more
    Caused by: java.lang.ClassNotFoundException: com.neusoft.util.AddSoapHeader
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
    ...省略...
    at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1273)
    ... 39 more

    查看异常信息发现这个异常是在初始化事件的时候出现的。

    出现这种异常报错一般有几种可能的原因:

    1、项目中使用到了连接池,但是没有导入commons.pool.jar包,如果没有导入,导入该包即可解决。commons.pool.jar包下载链接:http://mirrors.tuna.tsinghua.edu.cn/apache//commons/pool/binaries/commons-pool2-2.6.0-bin.zip

    2、检查导入的jar包的版本对不对 ,版本不对也会导致这样的问题

    3、检查路径是否正确,有些时候applicationContext.xml 这个文件找不到,要放到classes下面。寻找报错的文件的路径与配置信息是否正确

    4、最后实在不可以的话可以重新安装tomcat,重新配置一下。

  • 相关阅读:
    又快又准的sql瓶颈诊断方法
    Qps从300到1500的优化过程
    Mysql性能优化全揭秘-庖丁解牛
    java学习笔记16-抽象类
    java学习笔记15-封装
    java学习笔记14-多态
    java学习笔记13-重写与重载
    Git学习笔记08-远程仓库
    Python3+Appium学习笔记09-元素定位android_uiautomator
    Python3+Appium学习笔记08-元素定位
  • 原文地址:https://www.cnblogs.com/lihuibin/p/9533070.html
Copyright © 2011-2022 走看看