java.lang.IllegalStateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • After deploying stream (such as "time | log"), the xd-container emits the following stacktrace(s) if the stream is in a deployed state when that xd-container process is halted via CTRL-C: {code} 20:15:31,415 INFO main-EventThread module.ModuleDeployer:215 - removed SimpleModule [name=log, type=sink, group=s, index=1 @128936ff] 20:15:31,417 ERROR main-EventThread imps.CuratorFrameworkImpl:512 - Watcher exception java.lang.IllegalStateException: org.springframework.context.annotation.AnnotationConfigApplicationContext@7bf4bc83 has been closed already at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:956) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:978) at org.springframework.xd.module.core.SimpleModule.getComponent(SimpleModule.java:214) at org.springframework.xd.dirt.plugins.AbstractMessageBusBinderPlugin.unbindConsumerAndProducers(AbstractMessageBusBinderPlugin.java:140) at org.springframework.xd.dirt.plugins.stream.StreamPlugin.beforeShutdown(StreamPlugin.java:74) at org.springframework.xd.dirt.module.ModuleDeployer.beforeShutdown(ModuleDeployer.java:267) at org.springframework.xd.dirt.module.ModuleDeployer.destroyModule(ModuleDeployer.java:217) at org.springframework.xd.dirt.module.ModuleDeployer.handleUndeploy(ModuleDeployer.java:197) at org.springframework.xd.dirt.module.ModuleDeployer.undeploy(ModuleDeployer.java:169) at org.springframework.xd.dirt.server.ContainerRegistrar.undeployModule(ContainerRegistrar.java:252) at org.springframework.xd.dirt.server.ContainerRegistrar$StreamModuleWatcher.process(ContainerRegistrar.java:580) at org.apache.curator.framework.imps.NamespaceWatcher.process(NamespaceWatcher.java:56) at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:522) at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498) 20:15:31,420 INFO main-EventThread server.ContainerRegistrar:250 - Undeploying module time-0: time type=source, deploymentProperties={count=1} 20:15:31,420 INFO main-EventThread module.ModuleDeployer:215 - removed SimpleModule [name=time, type=source, group=s, index=0 @51a42578] 20:15:31,420 ERROR main-EventThread imps.CuratorFrameworkImpl:512 - Watcher exception java.lang.IllegalStateException: org.springframework.context.annotation.AnnotationConfigApplicationContext@6d223732 has been closed already at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:956) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:978) at org.springframework.xd.module.core.SimpleModule.getComponent(SimpleModule.java:214) at org.springframework.xd.dirt.plugins.AbstractMessageBusBinderPlugin.unbindConsumerAndProducers(AbstractMessageBusBinderPlugin.java:144) at org.springframework.xd.dirt.plugins.stream.StreamPlugin.beforeShutdown(StreamPlugin.java:74) at org.springframework.xd.dirt.module.ModuleDeployer.beforeShutdown(ModuleDeployer.java:267) at org.springframework.xd.dirt.module.ModuleDeployer.destroyModule(ModuleDeployer.java:217) at org.springframework.xd.dirt.module.ModuleDeployer.handleUndeploy(ModuleDeployer.java:197) at org.springframework.xd.dirt.module.ModuleDeployer.undeploy(ModuleDeployer.java:169) at org.springframework.xd.dirt.server.ContainerRegistrar.undeployModule(ContainerRegistrar.java:252) at org.springframework.xd.dirt.server.ContainerRegistrar$StreamModuleWatcher.process(ContainerRegistrar.java:580) at org.apache.curator.framework.imps.NamespaceWatcher.process(NamespaceWatcher.java:56) at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:522) at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498) {code}
    via by Mark Fisher,
  • After deploying stream (such as "time | log"), the xd-container emits the following stacktrace(s) if the stream is in a deployed state when that xd-container process is halted via CTRL-C: {code} 20:15:31,415 INFO main-EventThread module.ModuleDeployer:215 - removed SimpleModule [name=log, type=sink, group=s, index=1 @128936ff] 20:15:31,417 ERROR main-EventThread imps.CuratorFrameworkImpl:512 - Watcher exception java.lang.IllegalStateException: org.springframework.context.annotation.AnnotationConfigApplicationContext@7bf4bc83 has been closed already at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:956) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:978) at org.springframework.xd.module.core.SimpleModule.getComponent(SimpleModule.java:214) at org.springframework.xd.dirt.plugins.AbstractMessageBusBinderPlugin.unbindConsumerAndProducers(AbstractMessageBusBinderPlugin.java:140) at org.springframework.xd.dirt.plugins.stream.StreamPlugin.beforeShutdown(StreamPlugin.java:74) at org.springframework.xd.dirt.module.ModuleDeployer.beforeShutdown(ModuleDeployer.java:267) at org.springframework.xd.dirt.module.ModuleDeployer.destroyModule(ModuleDeployer.java:217) at org.springframework.xd.dirt.module.ModuleDeployer.handleUndeploy(ModuleDeployer.java:197) at org.springframework.xd.dirt.module.ModuleDeployer.undeploy(ModuleDeployer.java:169) at org.springframework.xd.dirt.server.ContainerRegistrar.undeployModule(ContainerRegistrar.java:252) at org.springframework.xd.dirt.server.ContainerRegistrar$StreamModuleWatcher.process(ContainerRegistrar.java:580) at org.apache.curator.framework.imps.NamespaceWatcher.process(NamespaceWatcher.java:56) at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:522) at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498) 20:15:31,420 INFO main-EventThread server.ContainerRegistrar:250 - Undeploying module time-0: time type=source, deploymentProperties={count=1} 20:15:31,420 INFO main-EventThread module.ModuleDeployer:215 - removed SimpleModule [name=time, type=source, group=s, index=0 @51a42578] 20:15:31,420 ERROR main-EventThread imps.CuratorFrameworkImpl:512 - Watcher exception java.lang.IllegalStateException: org.springframework.context.annotation.AnnotationConfigApplicationContext@6d223732 has been closed already at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:956) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:978) at org.springframework.xd.module.core.SimpleModule.getComponent(SimpleModule.java:214) at org.springframework.xd.dirt.plugins.AbstractMessageBusBinderPlugin.unbindConsumerAndProducers(AbstractMessageBusBinderPlugin.java:144) at org.springframework.xd.dirt.plugins.stream.StreamPlugin.beforeShutdown(StreamPlugin.java:74) at org.springframework.xd.dirt.module.ModuleDeployer.beforeShutdown(ModuleDeployer.java:267) at org.springframework.xd.dirt.module.ModuleDeployer.destroyModule(ModuleDeployer.java:217) at org.springframework.xd.dirt.module.ModuleDeployer.handleUndeploy(ModuleDeployer.java:197) at org.springframework.xd.dirt.module.ModuleDeployer.undeploy(ModuleDeployer.java:169) at org.springframework.xd.dirt.server.ContainerRegistrar.undeployModule(ContainerRegistrar.java:252) at org.springframework.xd.dirt.server.ContainerRegistrar$StreamModuleWatcher.process(ContainerRegistrar.java:580) at org.apache.curator.framework.imps.NamespaceWatcher.process(NamespaceWatcher.java:56) at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:522) at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498) {code}
    via by Mark Fisher,
  • 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 at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:956) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:978) at org.springframework.xd.module.core.SimpleModule.getComponent(SimpleModule.java:164) at org.springframework.xd.dirt.plugins.AbstractMessageBusBinderPlugin.unbindConsumerAndProducers(AbstractMessageBusBinderPlugin.java:219) at org.springframework.xd.dirt.plugins.job.JobPlugin.removeModule(JobPlugin.java:70) at org.springframework.xd.dirt.module.ModuleDeployer.removeModule(ModuleDeployer.java:204) at org.springframework.xd.dirt.module.ModuleDeployer.destroyModule(ModuleDeployer.java:162) at org.springframework.xd.dirt.module.ModuleDeployer.handleUndeploy(ModuleDeployer.java:140) at org.springframework.xd.dirt.module.ModuleDeployer.undeploy(ModuleDeployer.java:112) at org.springframework.xd.dirt.server.ContainerRegistrar.undeployModule(ContainerRegistrar.java:256) at org.springframework.xd.dirt.server.ContainerRegistrar$JobModuleWatcher.process(ContainerRegistrar.java:753) at org.apache.curator.framework.imps.NamespaceWatcher.process(NamespaceWatcher.java:67) at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:522) at 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
    via by Ilayaperumal Gopinathan,
  • 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 at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:956) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:978) at org.springframework.xd.module.core.SimpleModule.getComponent(SimpleModule.java:164) at org.springframework.xd.dirt.plugins.AbstractMessageBusBinderPlugin.unbindConsumerAndProducers(AbstractMessageBusBinderPlugin.java:219) at org.springframework.xd.dirt.plugins.job.JobPlugin.removeModule(JobPlugin.java:70) at org.springframework.xd.dirt.module.ModuleDeployer.removeModule(ModuleDeployer.java:204) at org.springframework.xd.dirt.module.ModuleDeployer.destroyModule(ModuleDeployer.java:162) at org.springframework.xd.dirt.module.ModuleDeployer.handleUndeploy(ModuleDeployer.java:140) at org.springframework.xd.dirt.module.ModuleDeployer.undeploy(ModuleDeployer.java:112) at org.springframework.xd.dirt.server.ContainerRegistrar.undeployModule(ContainerRegistrar.java:256) at org.springframework.xd.dirt.server.ContainerRegistrar$JobModuleWatcher.process(ContainerRegistrar.java:753) at org.apache.curator.framework.imps.NamespaceWatcher.process(NamespaceWatcher.java:67) at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:522) at 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
    via by Ilayaperumal Gopinathan,
    • java.lang.IllegalStateException: org.springframework.context.annotation.AnnotationConfigApplicationContext@7bf4bc83 has been closed already at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:956) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:978) at org.springframework.xd.module.core.SimpleModule.getComponent(SimpleModule.java:214) at org.springframework.xd.dirt.plugins.AbstractMessageBusBinderPlugin.unbindConsumerAndProducers(AbstractMessageBusBinderPlugin.java:140) at org.springframework.xd.dirt.plugins.stream.StreamPlugin.beforeShutdown(StreamPlugin.java:74) at org.springframework.xd.dirt.module.ModuleDeployer.beforeShutdown(ModuleDeployer.java:267) at org.springframework.xd.dirt.module.ModuleDeployer.destroyModule(ModuleDeployer.java:217) at org.springframework.xd.dirt.module.ModuleDeployer.handleUndeploy(ModuleDeployer.java:197) at org.springframework.xd.dirt.module.ModuleDeployer.undeploy(ModuleDeployer.java:169) at org.springframework.xd.dirt.server.ContainerRegistrar.undeployModule(ContainerRegistrar.java:252) at org.springframework.xd.dirt.server.ContainerRegistrar$StreamModuleWatcher.process(ContainerRegistrar.java:580) at org.apache.curator.framework.imps.NamespaceWatcher.process(NamespaceWatcher.java:56) at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:522) at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498)

    Users with the same issue

    ivanszkypeter
    1 times, last one,
    Unknown visitor1 times, last one,
    kjhdofjosvs
    236 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    19 more bugmates