严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1928)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1771)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:536)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:518)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:148)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5073)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5680)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1702)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1692)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

1.概述

之前正常启动的服务端程序,今天打开突然爆出这样的错误。从直观上来看是缺少Spring相关包,但是我删除maven下载的依赖包后,重新update还是有问题,肯定不是这个问题。

2.解决方法

(1)清楚缓存法

删除eclipse中所有的server,然后clean工程,再新建一个server。然后看看问题有没有解决。如果没有往下看。

(2)修改Deployment Assembly

1.1右击工程,选择属性,到Deployment Assembly页面,点击Add。

严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis_依赖包

1.2选择Jave Build Path Entries

严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis_依赖包_02

1.3将程序maven管理的依赖包加进去

严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis_apache_03

1.4重启server