- 
        Couldn't load subscription status. 
- Fork 38.8k
Description
Kirk Rasmussen opened SPR-9591 and commented
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ConfigurableWebApplicationContext, ServletContext)
The following code ignores that the parent was already set previously and ends up setting the parent to null.
		// Determine parent for root web application context, if any.
		ApplicationContext parent = loadParentContext(sc);
		wac.setParent(parent);
The documentation for org.springframework.web.context.ContextLoaderListener.ContextLoaderListener(WebApplicationContext) doesn't match the implementation for condition (b)
The context may or may not yet be refreshed. If it (a) is an implementation of ConfigurableWebApplicationContext and (b) has not already been refreshed (the recommended approach), then the following will occur:
It appears that refresh is ALWAYS called:
org.springframework.web.context.ContextLoader.initWebApplicationContext(ServletContext)
			if (this.context instanceof ConfigurableWebApplicationContext) {
				configureAndRefreshWebApplicationContext((ConfigurableWebApplicationContext)this.context, servletContext);
Issue Links:
- ContextLoader incorrectly refreshes already refreshed context [SPR-9996] #14630 ContextLoader incorrectly refreshes already refreshed context
Backported to: 3.1.4