-
Bug
-
Resolution: Done
-
Minor
-
7.4.15.GA
-
None
-
False
-
None
-
False
-
-
-
-
-
-
-
-
After https://github.com/wildfly/wildfly/pull/16379/ (included in 7.4.11+), EAP/Wildfly now undeploys in the event of a context start up exception. This results in contextDestroyed being call on all listeners, though not all listeners have had contextInitialized called in what progress had previously been made in start up before the error. So for Bootstrap$WebSocketListener.contextDestroyed, this means its container field is not initialized and remains null to result in an NPE after an application's start up error:
15:32:33,756 ERROR [io.undertow.servlet.request] (ServerService Thread Pool -- 78) UT015005: Error invoking method contextDestroyed on listener class io.undertow.websockets.jsr.Bootstrap$WebSocketListener: java.lang.NullPointerException at io.undertow.websocket@2.2.26.SP1-redhat-00001//io.undertow.websockets.jsr.Bootstrap$WebSocketListener.contextDestroyed(Bootstrap.java:133) at io.undertow.servlet@2.2.26.SP1-redhat-00001//io.undertow.servlet.core.ApplicationListeners.contextDestroyed(ApplicationListeners.java:202) at io.undertow.servlet@2.2.26.SP1-redhat-00001//io.undertow.servlet.core.DeploymentImpl.destroy(DeploymentImpl.java:291) at io.undertow.servlet@2.2.26.SP1-redhat-00001//io.undertow.servlet.core.DeploymentManagerImpl$4.call(DeploymentManagerImpl.java:683) at io.undertow.servlet@2.2.26.SP1-redhat-00001//io.undertow.servlet.core.DeploymentManagerImpl$4.call(DeploymentManagerImpl.java:673) at io.undertow.servlet@2.2.26.SP1-redhat-00001//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42) at io.undertow.servlet@2.2.26.SP1-redhat-00001//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at org.wildfly.extension.undertow@7.4.13.GA-redhat-00001//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105) at org.wildfly.extension.undertow@7.4.13.GA-redhat-00001//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1555) at org.wildfly.extension.undertow@7.4.13.GA-redhat-00001//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1555) at org.wildfly.extension.undertow@7.4.13.GA-redhat-00001//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1555) at org.wildfly.extension.undertow@7.4.13.GA-redhat-00001//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1555) at io.undertow.servlet@2.2.26.SP1-redhat-00001//io.undertow.servlet.core.DeploymentManagerImpl.undeploy(DeploymentManagerImpl.java:688) at org.wildfly.extension.undertow@7.4.13.GA-redhat-00001//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:101) at org.wildfly.extension.undertow@7.4.13.GA-redhat-00001//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990) at org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377) at java.base/java.lang.Thread.run(Thread.java:829) at org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.JBossThread.run(JBossThread.java:513)
That is caught safely and any other listeners following this are called so doesn't seem there'd be any functional impact, but it's extra log noise we should avoid.
- clones
-
JBEAP-26755 [GSS](8.0.z) UNDERTOW-2354 - Bootstrap$WebSocketListener.contextDestroyed throws NPE after application start up error
- Closed
- is caused by
-
JBEAP-24306 [GSS](7.4.z) WFLY-17365 - Failed deployment is not removed from Undertow ServletContainer's deployments map
- Closed
-
WFLY-17365 Failed deployment is not removed from Undertow ServletContainer's deployments map
- Closed
- is incorporated by
-
JBEAP-26815 (7.4.z) Upgrade undertow from 2.2.30.SP1-redhat-00001 to 2.2.32.SP1-redhat-00001
- Closed
- links to