本文主要是介绍SSM启动报错 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
项目框架为SpringMVC+Spring+Mybatis,启动tomcat时报错如下:
严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListenerat org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:142)at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4876)at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5455)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)at java.util.concurrent.FutureTask.run(Unknown Source)at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)at java.lang.Thread.run(Unknown Source)六月 22, 2018 4:55:32 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Skipped installing application listeners due to previous error(s)
六月 22, 2018 4:55:32 下午 org.apache.catalina.core.StandardContext startInternal
严重: Error listenerStart
六月 22, 2018 4:55:32 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/generator] startup failed due to previous errors
六月 22, 2018 4:55:32 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-80"]
六月 22, 2018 4:55:32 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
六月 22, 2018 4:55:32 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 1388 ms
解决:右键项目,点击Properties,选择Deployment Assembly,如下界面,点击Add
选择 Java Build Path Entries
选择 Maven Dependencies,点击Finish,最后点击 Apply and Close,重启即可
这篇关于SSM启动报错 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!