jettyRun ClassNotFoundException on groovy file change in spring app

I have a spring application that I can run with jettyRun. It runs fine.

My web.xml file has references a few of my classes for listeners and servlet filters, for example:


Now I have enabled automatic reloading, and I change a source file and run

gradle compileGroovy

When jetty restarts itself, I get errors that my listener and filter classes cannot be found. I suspect something is not being configured the same way on the reload as it is on the initial start, but I’m not sure what that is yet.

Update: There might be some sort of race going on here. When I make the reload interval longer, 10 seconds in this case, I don’t see the problem.