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,重新配置一下。

  • 相关阅读:
    Lead推荐学asp.net书籍
    universal image loader自己使用的一些感受
    【转】Android应用中使用AsyncHttpClient来异步网络数据
    【转】一次完整的HTTP请求所经历的7个步骤
    RoundedImageView,实现圆形、圆角矩形的注意事项
    ViewPager做图片浏览器,加载大量图片OOM的问题修正
    加载拍照原图,出现错误
    【转】Android ImageView的scaleType属性与adjustViewBounds属性
    解决图片浏览器返回上一个页面界面过渡不自然的问题
    asynchttpClient框架关于多文件批量上传的问题,改用xUtil
  • 原文地址:https://www.cnblogs.com/lihuibin/p/9533070.html
Copyright © 2011-2022 走看看