gpt4 book ai didi

java.lang.NoClassDefFoundError : org/springframework/web/context/ContextCleanupListener 错误

转载 作者:搜寻专家 更新时间:2023-11-01 03:28:03 24 4
gpt4 key购买 nike

我有一个使用 spring 框架构建的 webapp。我正在尝试使用 Eclipse 将其部署到 Tomcat6。每次我对 jsp 文件进行更改时,我都必须清理构建、发布它然后启动服务器。我相信,我们不必为 JSP 更改执行所有这些步骤。如果我只是发布文件,当服务器运行时,我会得到以下异常

SEVERE: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener java.lang.NoClassDefFoundError: org/springframework/web/context/ContextCleanupListener

SEVERE: Exception sending context destroyed event to listener instance of class org.springframework.web.util.Log4jConfigListener java.lang.NoClassDefFoundError: org/springframework/util/Log4jConfigurer

而且 war 文件没有部署到服务器中。

如果我对 JSP 文件进行更改,然后在 Eclipse 中单击重新启动,它有时会发布文件,然后启动服务器。但在某些情况下,它会重新启动服务器,然后发布文件(在这种情况下,我遇到了上述异常,并且没有部署 war 文件)。

理想的工作方式是,停止服务器,发布内容,然后启动服务器。每次我进行简单的 jsp 更改时,我都讨厌这样做。是否有替代的一键式流程来执行此操作?

最佳答案

您在 Eclipse 中设置项目或服务器的方式有问题。我建议按照说明进行操作 here .另外,您可能需要下载 STS (Eclipse 已经与 Spring 支持捆绑在一起)并使用它代替 vanilla eclipse。

关于java.lang.NoClassDefFoundError : org/springframework/web/context/ContextCleanupListener 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8170801/

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