George Jiang created CXF-7747:
---------------------------------
Summary: FileUtils.maybeDeleteDefaultTempDir causes an
IllegalStateException if it tries to remove the shutdown hook while the JVM is
already shutting down
Key: CXF-7747
URL: https://issues.apache.org/jira/browse/CXF-7747
Project: CXF
Issue Type: Bug
Environment: Java: jdk1.8.0_144
Spring-boot: 1.4.1
CXF: 2.1.4
Jetty: 9.3.11.v20160721
Operating system: Windows 7
Reporter: George Jiang
I have seen this error in Jetty after a failsafe junit validation test suite
finishes.
2018-05-23T13:58:07,188 +147913 [Thread-28] WARN
org.eclipse.jetty.servlet.ServletHolder - []:
java.lang.IllegalStateException: Shutdown in progress
at
java.lang.ApplicationShutdownHooks.remove(ApplicationShutdownHooks.java:82)
~[?:1.8.0_144]
at java.lang.Runtime.removeShutdownHook(Runtime.java:239) ~[?:1.8.0_144]
at
org.apache.cxf.helpers.FileUtils.maybeDeleteDefaultTempDir(FileUtils.java:122)
~[cxf-core-3.1.14.jar:3.1.14]
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.destroy(AbstractHTTPServlet.java:128)
~[cxf-rt-transports-http-3.1.14.jar:3.1.14]
at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.destroy(CXFNonSpringServlet.java:214)
~[cxf-rt-transports-http-3.1.14.jar:3.1.14]
at
org.eclipse.jetty.servlet.ServletHolder.destroyInstance(ServletHolder.java:475)
~[jetty-servlet-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.servlet.ServletHolder.doStop(ServletHolder.java:446)
[jetty-servlet-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.servlet.ServletHandler.doStop(ServletHandler.java:281)
[jetty-servlet-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:143)
[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:161)
[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.server.handler.AbstractHandler.doStop(AbstractHandler.java:73)
[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.security.SecurityHandler.doStop(SecurityHandler.java:381)
[jetty-security-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.security.ConstraintSecurityHandler.doStop(ConstraintSecurityHandler.java:456)
[jetty-security-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:143)
[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:161)
[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.server.handler.AbstractHandler.doStop(AbstractHandler.java:73)
[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.server.session.SessionHandler.doStop(SessionHandler.java:127)
[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:143)
[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:161)
[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.server.handler.AbstractHandler.doStop(AbstractHandler.java:73)
[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.server.handler.ContextHandler.stopContext(ContextHandler.java:825)
[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.servlet.ServletContextHandler.stopContext(ServletContextHandler.java:356)
[jetty-servlet-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.webapp.WebAppContext.stopWebapp(WebAppContext.java:1410)
[jetty-webapp-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.webapp.WebAppContext.stopContext(WebAppContext.java:1374)
[jetty-webapp-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:880)
[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:272)
[jetty-servlet-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:544)
[jetty-webapp-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:143)
[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:161)
[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.server.handler.AbstractHandler.doStop(AbstractHandler.java:73)
[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.server.Server.doStop(Server.java:482)
[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at
org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainer.stop(JettyEmbeddedServletContainer.java:201)
[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.stopAndReleaseEmbeddedServletContainer(EmbeddedWebApplicationContext.java:306)
[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onClose(EmbeddedWebApplicationContext.java:155)
[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1014)
[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext$2.run(AbstractApplicationContext.java:929)
[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)