Uploaded image for project: 'mod_cluster'
  1. mod_cluster
  2. MODCLUSTER-790

mod_cluster listener throws NPE when deploying a context in Tomcat

XMLWordPrintable

      10-Jul-2023 10:20:44.304 INFO [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/dev/shm/mod_cluster/jws-6.0/tomcat/webapps/hello-sailor.war]
      10-Jul-2023 10:20:44.319 SEVERE [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/dev/shm/mod_cluster/jws-6.0/tomcat/webapps/hello-sailor.war]
      	java.lang.NullPointerException
      		at org.jboss.modcluster.container.tomcat.TomcatContext.getActiveSessionCount(TomcatContext.java:141)
      		at org.jboss.modcluster.ModClusterService.drainSessions(ModClusterService.java:701)
      		at org.jboss.modcluster.ModClusterService.stop(ModClusterService.java:368)
      		at org.jboss.modcluster.ModClusterService.add(ModClusterService.java:307)
      		at org.jboss.modcluster.container.tomcat.TomcatEventHandlerAdapter.containerEvent(TomcatEventHandlerAdapter.java:139)
      		at org.apache.catalina.core.ContainerBase.fireContainerEvent(ContainerBase.java:1147)
      		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:676)
      		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:658)
      		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:713)
      		at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:975)
      		at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1949)
      		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.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
      		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
      		at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:776)
      		at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:426)
      		at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1705)
      		at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:305)
      		at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
      		at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1102)
      		at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1301)
      		at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1305)
      		at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1283)
      		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      		at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
      		at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
      		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      		at java.base/java.lang.Thread.run(Thread.java:829)
      10-Jul-2023 10:20:44.320 INFO [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/dev/shm/mod_cluster/jws-6.0/tomcat/webapps/hello-sailor.war] has finished in [16] ms
      10-Jul-2023 10:21:16.339 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
      

      Tested also using the vanilla upstream 10.1.11 and deploys and works as expected.

              rhn-engineering-rhusar Radoslav Husar
              plodge Paul Lodge
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: