java.lang.NoClassDefFoundError:org / springframework / web / context / ContextCleanupListener [英] java.lang.NoClassDefFoundError: org/springframework/web/context/ContextCleanupListener

查看:1743
本文介绍了java.lang.NoClassDefFoundError:org / springframework / web / context / ContextCleanupListener的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用spring框架构建的webapp。我试图使用Eclipse将其部署到Tomcat6。每次我改变jsp文件,我不得不清理构建,发布它&然后启动服务器。我相信,我们不需要为JSP更改做所有这些步骤。如果我刚刚发布文件,当服务器运行时,我得到以下例外


SEVERE:异常发送上下文破坏事件到监听器实例的类org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError:org / springframework / web / context / ContextCleanupListener



SEVERE:异常发送上下文摧毁事件到类org.springframework.web.util.Log4jConfigListener的监听器实例
java.lang.NoClassDefFoundError:org / springframework / util / Log4jConfigurer


战争文件没有在服务器中部署。



如果我更改JSP文件和然后在eclipse中单击重新启动,它有时会发布文件&然后启动服务器。但在某些情况下,它会重新启动服务器和然后发布文件(在这种情况下,我得到上述异常,war文件没有被部署)。



它的理想方式是停止服务器,发布内容&然后启动服务器。每次我做一个简单的jsp更改,我都讨厌这样做。有没有别的一个点击流程来做到这一点?

解决方案

确保弹簧与应用程序一起部署。在eclipse中设置正确的导出选项或将弹簧库复制到/ WEB-INF / lib。



MyEclipse 在这里工作正常。您还可以查看 JRebel 。他们宣传没有重新部署。 ;)


I have a webapp built using spring framework. I'm trying to deploy this to Tomcat6 using Eclipse. Everytime i make a change to jsp file, I had to clean the build, publish it & then start the server. I believe, we don't have to do all these steps for JSP changes. If i just publish the files, when the server is running, i get the below exceptions

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

And the war file is not getting deployed in server.

If I make a change to JSP file & then click restart in eclipse, it sometimes publish the files & then start the server. But in some cases, it restarts the server & then publishes the files (in which case i got the above mentioned exceptions & the war file was not getting deployed).

Ideal way that it works is, Stop the server, publish the contents & then start the server. I hate to do this every time i make a simple jsp change. Is there any alternate one click process to do this?

解决方案

Make sure that spring is deployed together with your application. Either set the correct export options in eclipse or copy the spring libraries to /WEB-INF/lib.

MyEclipse works fine here. You could also check JRebel as well. They advertise no redeployments. ;)

这篇关于java.lang.NoClassDefFoundError:org / springframework / web / context / ContextCleanupListener的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆