java.lang.IllegalStateException: The ApplicationContext is closed and the ConnectionFactory can no longer create connections.

Stack Overflow | Shan | 4 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 1

    Rabbitmq throwing IllegalStateException intermittently

    Stack Overflow | 4 months ago | Shan
    java.lang.IllegalStateException: The ApplicationContext is closed and the ConnectionFactory can no longer create connections.
  2. 0
    samebug tip
    If you're using boot 1.4.x you need to modify the @springBootTest annotation to @SpringBootTest(classes = DataFlowServerConfiguration.class). 1.3.8 doesn't have this problem as well.
    via GitHub by trisberg
  3. 0

    GitHub comment 11#155290898

    GitHub | 1 year ago | artembilan
    java.lang.IllegalStateException: The ApplicationContext is closed and the ConnectionFactory can no longer create connections.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Simple WebMvcTest fails with Spring Boot 1.4M3 due to missing SpringBootConfiguration

    GitHub | 9 months ago | jgoldhammer
    java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test

  1. SteVio1989 8 times, last 2 weeks ago
  2. jpvee 2 times, last 2 months ago
  3. Hronom 3 times, last 2 months ago
  4. iferca 42 times, last 2 months ago
  5. tvrmsmith 1 times, last 2 months ago
2 more registered users
49 unregistered visitors
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

    The ApplicationContext is closed and the ConnectionFactory can no longer create connections.

    at org.springframework.util.Assert.state()
  2. Spring Core
    Assert.state
    1. org.springframework.util.Assert.state(Assert.java:392)
    1 frame
  3. Spring RabbitMQ Support
    SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run
    1. org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:543)
    2. org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils$1.createConnection(ConnectionFactoryUtils.java:90)
    3. org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.doGetTransactionalResourceHolder(ConnectionFactoryUtils.java:140)
    4. org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.getTransactionalResourceHolder(ConnectionFactoryUtils.java:76)
    5. org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:472)
    6. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1280)
    6 frames
  4. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame