java.lang.IllegalStateException: org.springframework.context.annotation.AnnotationConfigApplicationContext@6d223732 has been closed already

Spring JIRA | Mark Fisher | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    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}

    Spring JIRA | 3 years ago | Mark Fisher
    java.lang.IllegalStateException: org.springframework.context.annotation.AnnotationConfigApplicationContext@6d223732 has been closed already
  2. 0

    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}

    Spring JIRA | 3 years ago | Mark Fisher
    java.lang.IllegalStateException: org.springframework.context.annotation.AnnotationConfigApplicationContext@6d223732 has been closed already
  3. 0

    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

    Spring JIRA | 3 years ago | Ilayaperumal Gopinathan
    java.lang.IllegalStateException: org.springframework.context.annotation.AnnotationConfigApplicationContext@422fd7b7 has been closed already
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    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

    Spring JIRA | 3 years ago | Ilayaperumal Gopinathan
    java.lang.IllegalStateException: org.springframework.context.annotation.AnnotationConfigApplicationContext@422fd7b7 has been closed already
  6. 0

    Grails 3.0.2: With JDK8, grails run-app returns an InvocationTargetException, when modifying a controller

    GitHub | 2 years ago | olavgg
    java.lang.IllegalStateException: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4b672daa has been closed already
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalStateException

    org.springframework.context.annotation.AnnotationConfigApplicationContext@6d223732 has been closed already

    at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive()
  2. Spring Context
    AbstractApplicationContext.getBean
    1. org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:956)
    2. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:978)
    2 frames
  3. org.springframework.xd
    ContainerRegistrar$StreamModuleWatcher.process
    1. org.springframework.xd.module.core.SimpleModule.getComponent(SimpleModule.java:214)
    2. org.springframework.xd.dirt.plugins.AbstractMessageBusBinderPlugin.unbindConsumerAndProducers(AbstractMessageBusBinderPlugin.java:144)
    3. org.springframework.xd.dirt.plugins.stream.StreamPlugin.beforeShutdown(StreamPlugin.java:74)
    4. org.springframework.xd.dirt.module.ModuleDeployer.beforeShutdown(ModuleDeployer.java:267)
    5. org.springframework.xd.dirt.module.ModuleDeployer.destroyModule(ModuleDeployer.java:217)
    6. org.springframework.xd.dirt.module.ModuleDeployer.handleUndeploy(ModuleDeployer.java:197)
    7. org.springframework.xd.dirt.module.ModuleDeployer.undeploy(ModuleDeployer.java:169)
    8. org.springframework.xd.dirt.server.ContainerRegistrar.undeployModule(ContainerRegistrar.java:252)
    9. org.springframework.xd.dirt.server.ContainerRegistrar$StreamModuleWatcher.process(ContainerRegistrar.java:580)
    9 frames
  4. Curator Framework
    NamespaceWatcher.process
    1. org.apache.curator.framework.imps.NamespaceWatcher.process(NamespaceWatcher.java:56)
    1 frame
  5. Zookeeper
    ClientCnxn$EventThread.run
    1. org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:522)
    2. org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498)
    2 frames