Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnsupportedOperationException is thrown from war when shutting down Tomcat #21684

Closed
gurpreetsingh85 opened this issue Jun 3, 2020 · 3 comments
Assignees
Labels
type: regression A regression from a previous release
Milestone

Comments

@gurpreetsingh85
Copy link

gurpreetsingh85 commented Jun 3, 2020

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)
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 3, 2020
@philwebb
Copy link
Member

philwebb commented Jun 3, 2020

Possible related to #21221

@philwebb philwebb added type: bug A general bug type: regression A regression from a previous release and removed status: waiting-for-triage An issue we've not yet triaged type: bug A general bug labels Jun 3, 2020
@philwebb philwebb added this to the 2.3.x milestone Jun 3, 2020
@philwebb philwebb self-assigned this Jun 4, 2020
@philwebb philwebb changed the title Exception when shutting down spring boot war in Tomcat9 (Spring Boot 2.3.0) UnsupportedOperationException is thrown from war when shutting down Tomcat Jun 4, 2020
@philwebb philwebb modified the milestones: 2.3.x, 2.3.1 Jun 4, 2020
@philwebb
Copy link
Member

philwebb commented Jun 4, 2020

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

@gurpreetsingh85
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
Development

No branches or pull requests

3 participants