Project: springxd
Issue XD-1953: Stacktrace on container with deployed modules is shutdown
When the container that has deployed module is shutdown, following stacktrace is thrown: 10:10:27,560 INFO main-EventThread server.ContainerRegistrar:254 - Undeploying module [ModuleDescriptor@3a615460 moduleName = 'job', moduleLabel = 'job', group = 'j4', sourceChannelName = [null], sinkChannelName = [null], sinkChannelName = [null], index = 0, type = job, parameters = map[[empty]], children = list[[empty]]] 10:10:27,560 INFO main-EventThread module.ModuleDeployer:158 - removed SimpleModule [name=job, type=job, group=j4, index=0 @7df1aff2] 10:10:27,561 ERROR main-EventThread imps.CuratorFrameworkImpl:555 - Watcher exception java.lang.IllegalStateException: org.springframework.context.annotation.AnnotationConfigApplicationContext@422fd7b7 has been closed already org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:956) org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:978) org.springframework.xd.module.core.SimpleModule.getComponent(SimpleModule.java:164) org.springframework.xd.dirt.plugins.AbstractMessageBusBinderPlugin.unbindConsumerAndProducers(AbstractMessageBusBinderPlugin.java:219) org.springframework.xd.dirt.plugins.job.JobPlugin.removeModule(JobPlugin.java:70) org.springframework.xd.dirt.module.ModuleDeployer.removeModule(ModuleDeployer.java:204) org.springframework.xd.dirt.module.ModuleDeployer.destroyModule(ModuleDeployer.java:162) org.springframework.xd.dirt.module.ModuleDeployer.handleUndeploy(ModuleDeployer.java:140) org.springframework.xd.dirt.module.ModuleDeployer.undeploy(ModuleDeployer.java:112) org.springframework.xd.dirt.server.ContainerRegistrar.undeployModule(ContainerRegistrar.java:256) org.springframework.xd.dirt.server.ContainerRegistrar$JobModuleWatcher.process(ContainerRegistrar.java:753) org.apache.curator.framework.imps.NamespaceWatcher.process(NamespaceWatcher.java:67) org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:522) org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498) 10:10:27,561 INFO main-EventThread zookeeper.ClientCnxn:512 - EventThread shut down 10:10:27,564 INFO Thread-2 jmx.EndpointMBeanExporter:433 - Unregistering JMX-exposed beans on shutdown
Story points: 2