org.springframework.amqp.rabbit.listener.ListenerExecutionFailedException: Listener threw exception

Spring JIRA | Stuart Williams | 4 years ago
  1. 0

    {code} this.flow = messageFlow {        amqpListen queueNames:config.rabbit.queue, connectionFactory:'connectionFactory', autoStartup:false        transform { Message msg->          unpackGzip(msg)        }        transform { Message msg->          transformToJsonObject(msg)        }        handle { Message msg->          eventBus.send(config.stream, msg.getPayload() as String)        } } {code} which throws the following exception: 2013-05-10 10:03:12.307 WARN [SimpleAsyncTaskExecutor-1]: [org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer] Execution of Rabbit message listener failed, and no ErrorHandler has been set. org.springframework.amqp.rabbit.listener.ListenerExecutionFailedException: Listener threw exception at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.wrapToListenerExecutionFailedExceptionIfNeeded(AbstractMessageListenerContainer.java:647) at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:586) at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:482) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$001(SimpleMessageListenerContainer.java:58) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$1.invokeListener(SimpleMessageListenerContainer.java:107) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.invokeListener(SimpleMessageListenerContainer.java:608) at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:454) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:471) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:455) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$300(SimpleMessageListenerContainer.java:58) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:548) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.IllegalArgumentException: The replyTo header must not be null on a request Message being handled by the AMQP inbound gateway. at org.springframework.util.Assert.notNull(Assert.java:112) at org.springframework.integration.amqp.inbound.AmqpInboundGateway$1.onMessage(AmqpInboundGateway.java:91) at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:584) ... 10 more I'm not sending a reply from the closure at the end of the flow, it's a void method this should result in a the Callable.call() returning null too manually returning null seems to fix it

    Spring JIRA | 4 years ago | Stuart Williams
    org.springframework.amqp.rabbit.listener.ListenerExecutionFailedException: Listener threw exception
  2. 0

    {code} this.flow = messageFlow {        amqpListen queueNames:config.rabbit.queue, connectionFactory:'connectionFactory', autoStartup:false        transform { Message msg->          unpackGzip(msg)        }        transform { Message msg->          transformToJsonObject(msg)        }        handle { Message msg->          eventBus.send(config.stream, msg.getPayload() as String)        } } {code} which throws the following exception: 2013-05-10 10:03:12.307 WARN [SimpleAsyncTaskExecutor-1]: [org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer] Execution of Rabbit message listener failed, and no ErrorHandler has been set. org.springframework.amqp.rabbit.listener.ListenerExecutionFailedException: Listener threw exception at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.wrapToListenerExecutionFailedExceptionIfNeeded(AbstractMessageListenerContainer.java:647) at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:586) at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:482) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$001(SimpleMessageListenerContainer.java:58) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$1.invokeListener(SimpleMessageListenerContainer.java:107) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.invokeListener(SimpleMessageListenerContainer.java:608) at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:454) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:471) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:455) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$300(SimpleMessageListenerContainer.java:58) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:548) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.IllegalArgumentException: The replyTo header must not be null on a request Message being handled by the AMQP inbound gateway. at org.springframework.util.Assert.notNull(Assert.java:112) at org.springframework.integration.amqp.inbound.AmqpInboundGateway$1.onMessage(AmqpInboundGateway.java:91) at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:584) ... 10 more I'm not sending a reply from the closure at the end of the flow, it's a void method this should result in a the Callable.call() returning null too manually returning null seems to fix it

    Spring JIRA | 4 years ago | Stuart Williams
    org.springframework.amqp.rabbit.listener.ListenerExecutionFailedException: Listener threw exception
  3. 0

    Bean object must not be null in Spring MVC

    Stack Overflow | 3 years ago | Sivanagaiah
    java.lang.IllegalArgumentException: Bean object must not be null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring file upload by ajax

    Stack Overflow | 3 years ago | kris14an
    java.lang.IllegalArgumentException: Expected MultipartHttpServletRequest: is a MultipartResolver configured?
  6. 0

    mybatis + spring failed to start

    Google Groups | 5 years ago | Hain Bach
    java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
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.IllegalArgumentException

    The replyTo header must not be null on a request Message being handled by the AMQP inbound gateway.

    at org.springframework.util.Assert.notNull()
  2. Spring Core
    Assert.notNull
    1. org.springframework.util.Assert.notNull(Assert.java:112)
    1 frame
  3. org.springframework.integration
    AmqpInboundGateway$1.onMessage
    1. org.springframework.integration.amqp.inbound.AmqpInboundGateway$1.onMessage(AmqpInboundGateway.java:91)
    1 frame
  4. Spring RabbitMQ Support
    SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run
    1. org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:584)
    2. org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:482)
    3. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$001(SimpleMessageListenerContainer.java:58)
    4. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$1.invokeListener(SimpleMessageListenerContainer.java:107)
    5. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.invokeListener(SimpleMessageListenerContainer.java:608)
    6. org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:454)
    7. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:471)
    8. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:455)
    9. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$300(SimpleMessageListenerContainer.java:58)
    10. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:548)
    10 frames
  5. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:722)
    1 frame