war.zip

This issue is only happening with 2.3.0 release of Spring Boot. Shutting down my application throws the following exception.

SEVERE: Exception sending context destroyed event to listener instance of class [org.springframework.boot.web.servlet.support.SpringBootServletInitializer$1]
java.lang.UnsupportedOperationException: Section 4.4 of the Servlet 3.0 specification does not permit this method to be called from a ServletContextListener that was not defined in web.xml, a web-fragment.xml file nor annotated with @WebListener
    at org.apache.catalina.core.StandardContext$NoPluggabilityServletContext.getClassLoader(StandardContext.java:6683)
    at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.deregisterJdbcDrivers(SpringBootServletInitializer.java:134)
    at org.springframework.boot.web.servlet.support.SpringBootServletInitializer$1.contextDestroyed(SpringBootServletInitializer.java:110)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4730)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5397)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
    at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
    at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
    at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
    at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:473)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:992)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    at org.apache.catalina.startup.Catalina.stop(Catalina.java:706)
    at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:803)

Comment From: philwebb

Possible related to #21221

Comment From: philwebb

Thanks for the report @gurpreetsingh85. If you get a chance, could you please try the latest SNAPSHOT to check that the issue is fixed.

Comment From: gurpreetsingh85

Thanks for the report @gurpreetsingh85. If you get a chance, could you please try the latest SNAPSHOT to check that the issue is fixed.

@philwebb i have tried with the latest SNAPSHOT and i don't see the issue anymore. Thank you so much.