Experience an error No provider of PromiseProvider found! when running servlet application with spring.
I guess it may be related to the class loader hierarchy or class loading sequence.
Currently I hack around this by adding a listener to the servlet
<listener>
<listener-class>ServletStartupListener</listener-class>
</listener>
public class ServletStartupListener implements ServletContextListener {
public void contextInitialized(ServletContextEvent sce) {
log.info("Init JAsync");
JAsync.just();
}
}
I think one approach to solve this issue is to lazy load the provider instead of loading it in the static phase at JAsync.class
Experience an error
No provider of PromiseProvider found!when running servlet application with spring.I guess it may be related to the class loader hierarchy or class loading sequence.
Currently I hack around this by adding a listener to the servlet
I think one approach to solve this issue is to lazy load the provider instead of loading it in the static phase at JAsync.class