gpt4 book ai didi

java - Tomcat:配置类的应用程序监听器时出错

转载 作者:行者123 更新时间:2023-12-01 18:12:32 27 4
gpt4 key购买 nike

我在localhost / manager上,在我想要的战争中按了开始按钮。 localhost.log在下面。
注意:我尝试运行露天应用程序/我使用tomcat 9和jdk 11

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:1365)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:540)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:521)
at
...
org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at
...
java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
...
27-Feb-2020 19:44:28.225 SEVERE [http-nio-8081-exec-9] org.apache.catalina.core.StandardContext.listenerStart Skipped installing application listeners due to previous error(s)
...
27-Feb-2020 19:45:41.347 SEVERE [http-nio-8081-exec-5] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [org.springframework.web.context.ContextLoaderListener]
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
...
27-Feb-2020 20:08:26.996 SEVERE [http-nio-8081-exec-12] org.apache.catalina.core.StandardContext.listenerStart Skipped installing application listeners due to previous error(s)

最佳答案

我认为您部署的战争不包含spring-web jar。

如果是maven项目,则在pom.xml中添加依赖项。

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version><!-- Add your version--></version>
</dependency>


或从 here下载jar。

如果您还有其他问题,请参考此问题: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

关于java - Tomcat:配置类的应用程序监听器时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60440181/

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