• java.lang.ClassNotFoundException: org.springframework.web.content.ContextLoaderListener


    1、错误描述

    严重: Error configuring application listener of class org.springframework.web.content.ContextLoaderListener
    java.lang.ClassNotFoundException: org.springframework.web.content.ContextLoaderListener
    	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
    	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
    	at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:520)
    	at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:501)
    	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:120)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4650)
    	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5166)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    	at java.lang.Thread.run(Thread.java:745)
    
    八月 13, 2015 7:53:50 下午 org.apache.catalina.core.StandardContext listenerStart
    严重: Skipped installing application listeners due to previous error(s)
    八月 13, 2015 7:53:50 下午 org.apache.catalina.core.StandardContext startInternal
    严重: Error listenerStart
    八月 13, 2015 7:53:50 下午 org.apache.catalina.core.StandardContext startInternal
    严重: Context [/SendMail] startup failed due to previous errors

    2、错误原因

         我在web.xml中添加了一个监听器

    <listener>
          <listener-class>org.springframework.web.content.ContextLoaderListener</listener-class>
    </listener>
         并且导入了spring-web-4.1.1.RELEASE.jar,用反编译工具查看了这个jar,的确存在org.springframework.web.context.ContextLoaderListener,但是运行项目,还是报错



    3、解决办法

  • 相关阅读:
    序列化
    cookie 和 session
    a 标签提交表单
    SpringBoot使用Easypoi导出excel示例
    PDF操作类库 iText
    HandlerInterceptor
    Fastdfs
    InitializingBean
    CORS CorsFilter
    XMLHttpRequest
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13314439.html
Copyright © 2020-2023  润新知