Johan Gorter opened SWS-718 and commented
Our application uses a special classloader from which it can load beans dynamically. The applicationcontext is reloaded to do this. The normal DispatcherServlet has a mechanism to allow the applicationcontext to be reloaded by overriding the onRefresh method. The MessageDispatcherServlet does not do this and crashes occur when webservices are invoked.
The class below can be used as a workaround.
public class FixedMessageDispatcherServlet
extends MessageDispatcherServlet
{
private boolean initializing = true;
@Override
protected void onRefresh(ApplicationContext context)
{
try {
if (this.initializing) {
this.initializing = false;
} else {
this.initFrameworkServlet();
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
Affects: 2.0.2
Referenced from: commits 4b89c40