Hi,

I just played around with the graceful shutdown option server.shutdown.grace-period=1s while being on Tomcat 9.0.31 and got this error.

2020-04-08 20:40:46.278  INFO 42505 --- [extShutdownHook] o.s.b.w.e.tomcat.TomcatGracefulShutdown  : Commencing graceful shutdown, allowing up to 1s for active requests to complete
Exception in thread "SpringContextShutdownHook" java.lang.NoSuchMethodError: 'long org.apache.catalina.core.StandardContext.getInProgressAsyncCount()'
    at org.springframework.boot.web.embedded.tomcat.TomcatGracefulShutdown.active(TomcatGracefulShutdown.java:91)
    at org.springframework.boot.web.embedded.tomcat.TomcatGracefulShutdown.shutDownGracefully(TomcatGracefulShutdown.java:68)
    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.shutDownGracefully(TomcatWebServer.java:396)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.doClose(ServletWebServerApplicationContext.java:175)
    at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:948)

I found d8cead5457fad85bfba6de6f7e571603009184ea that removed the reflection call, so maybe the "hard" requirement on 9.0.33 can be documented at least somewhere.

Cheers, Christoph

Comment From: philwebb

Unless there's a compelling reason to support the older version, I think we should just document that we need 9.0.33. We could also catch that exception and provide a nicer message.

Comment From: philwebb

@dreis2211 Is there a particular reason you were using 9.0.31?

Comment From: dreis2211

Not at all - it was just pinned from previous experiments. I was simply a bit surprised about the hard requirement (as its quite unusual for Boot). Documentation is just fine.