java.lang.IllegalStateException

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

Samebug tips2

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.


rafaelrafael

Spring Boot 1.4 changed their annotation system a little. Try using the @SpringBootApplication annotation for better results.


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web184

  • via GitHub by artembilan
    ,
  • Stack trace

    • java.lang.IllegalStateException: The ApplicationContext is closed and the ConnectionFactory can no longer create connections. at org.springframework.util.Assert.state(Assert.java:392) at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:543) at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils$1.createConnection(ConnectionFactoryUtils.java:90) at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.doGetTransactionalResourceHolder(ConnectionFactoryUtils.java:140) at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.getTransactionalResourceHolder(ConnectionFactoryUtils.java:76) at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:472) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1280) at java.lang.Thread.run(Thread.java:745)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    HronomHronom
    3 times, last one
    tvrmsmithtvrmsmith
    2 times, last one
    bernardpaulusbernardpaulus
    18 times, last one
    DunmerDunmer
    Once,
    SteVio1989SteVio1989
    8 times, last one
    64 more bugmates