Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-2351

NullPointerException on flawed WebSockets war deployment

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 2.3.13.Final, 2.2.32.Final
    • 2.3.11.Final
    • None
    • None

    Description

      This is what happens when you try to deploy a war with a Websockets that has a EndpointConfig parameter at the @onMessage method:

      Failed to start service jboss.deployment.unit."ROOT.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.unit."ROOT.war".undertow-deployment: java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because "this.threadSetupActions" is null
              at org.wildfly.extension.undertow@31.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:73)
              at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
              at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
              at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
              at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
              at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
              at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
              at java.base/java.lang.Thread.run(Thread.java:1583)
              at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
      Caused by: java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because "this.threadSetupActions" is null
              at io.undertow.servlet@2.3.10.Final//io.undertow.servlet.core.DeploymentManagerImpl.undeploy(DeploymentManagerImpl.java:690)
              at org.wildfly.extension.undertow@31.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:93)
              at org.wildfly.extension.undertow@31.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:70)
              ... 8 more
      Caused by: java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because "this.threadSetupActions" is null
              at io.undertow.servlet@2.3.10.Final//io.undertow.servlet.core.DeploymentImpl.createThreadSetupAction(DeploymentImpl.java:176)
              at io.undertow.servlet@2.3.10.Final//io.undertow.servlet.core.DeploymentManagerImpl.undeploy(DeploymentManagerImpl.java:673)
              ... 10 more
      
      19:08:45,138 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "ROOT.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./" => "java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke \"java.util.List.iterator()\" because \"this.threadSetupActions\" is null
          Caused by: java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke \"java.util.List.iterator()\" because \"this.threadSetupActions\" is null
          Caused by: java.lang.NullPointerException: Cannot invoke \"java.util.List.iterator()\" because \"this.threadSetupActions\" is null"}}
      

      The NPE should not come up, and, instead, we want to see an error stating why the application could not be deployed.

      Attachments

        Issue Links

          Activity

            People

              rhn-cservice-bbaranow Bartosz Baranowski
              flaviarnn Flavia Rainone
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: