gpt4 book ai didi

spring - 运行时出错 : java. lang.ClassNotFoundException : org. springframework.web.context.ContextLoaderListener

转载 作者:行者123 更新时间:2023-11-28 22:42:56 24 4
gpt4 key购买 nike

我在 SO 中看到过许多具有相同问题的帖子。但这些帖子中提供的解决方案无助于解决我的问题。

我已经创建了一个 webapp 并试图在 tomcat 服务器中运行它。当我尝试运行该项目时,我得到 HTTP 状态 404,并且在 tomcat 控制台中出现以下错误:

Jan 27, 2014 6:02:40 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows \System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.7.0_10\bin;.
Jan 27, 2014 6:02:40 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:EmployeeServices' did not find a matching property.
Jan 27, 2014 6:02:40 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:BataMeServices' did not find a matching property.
Jan 27, 2014 6:02:40 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 27, 2014 6:02:40 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jan 27, 2014 6:02:40 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 535 ms
Jan 27, 2014 6:02:40 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jan 27, 2014 6:02:40 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.33
Jan 27, 2014 6:02:40 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
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:133)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
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$Sync.innerRun(Unknown Source)
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)

Jan 27, 2014 6:02:40 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Jan 27, 2014 6:02:40 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Jan 27, 2014 6:02:40 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/EmployeeServices] startup failed due to previous errors
Jan 27, 2014 6:02:41 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(D:\ielect_sw\ws_workspace\.metadata\.plugins\org.eclipse.wst.server.core\tm p1\wtpwebapps\BataMeServices\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Jan 27, 2014 6:02:43 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
log4j:ERROR setFile(null,true) call failed.

我已经正确添加了 spring 的所有 jar 依赖项。非常感谢任何解决上述问题的帮助。

最佳答案

关于spring - 运行时出错 : java. lang.ClassNotFoundException : org. springframework.web.context.ContextLoaderListener,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21381339/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com