Java.lang.NoClassDefFoundError: org / springframework / web / context / ContextCleanupListener

I have a webapp built using spring framework. I am trying to deploy this to Tomcat6 using Eclipse. Every time I make changes to the jsp file, I had to clean the assembly, publish it, and then start the server. I believe that we do not need to do all these steps to change the JSP. If I just publish the files when the server is running, I get the following exceptions

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

SEVERE: exception sending context destroyed the event for an instance of the listener class org.springframework.web.util.Log4jConfigListener java.lang.NoClassDefFoundError: org / springframework / util / Log4jConfigurer

And the war file is not deployed to the server.

If I make changes to the JSP file and then restart in eclipse, it sometimes publishes the files and then starts the server. But in some cases, it restarts the server and then publishes the files (in this case, I received the above exceptions and the military file did not expand).

Ideal way to work: stop the server, publish it and start the server. I hate doing this every time I make a simple jsp change. Is there an alternative click for this?

+4
source share
3 answers

There is something wrong with the way you set up your project or server in Eclipse. I would recommend following the instructions here . Alternatively, you can download STS (Eclipse is already bundled with Spring support) and use this instead of eclipsing vanilla.

+1
source

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

MyEclipse works great. You can also check out JRebel . They do not advertise redistribution .;)

+1
source

You can use exploded warfare and incremental hot deployment.

this should work http://www.youtube.com/watch?v=OMtcjgTyP-g

at 2:30

0
source

Source: https://habr.com/ru/post/1381744/


All Articles