question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RabbitAnnotationDrivenConfiguration NullPointerException

See original GitHub issue
....
<spring-cloud.version>Greenwich.M3</spring-cloud.version>
....

<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>

<dependency>
  <groupId>org.springframework.amqp</groupId>
  <artifactId>spring-rabbit</artifactId>
</dependency>

When you run it up

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rabbitListenerContainerFactory' defined in class path resource [org/springframework/boot/autoconfigure/amqp/RabbitAnnotationDrivenConfiguration.class]: Initialization of bean failed; nested exception is java.lang.NullPointerException
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:584) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
Lex4hexcommented, Dec 13, 2018

It’ll be fixed in 2.1.3 release of Spring AMQP

Spring JIRA issue https://github.com/spring-projects/spring-amqp/pull/860

As a temporary and ugly fix, you can enable retry properties, which will create an adviceChain: spring.rabbitmq.listener.direct.retry.enabled=true spring.rabbitmq.listener.simple.retry.enabled=true

3reactions
shibadogcommented, Dec 11, 2018

same issue with spring boot 2.1.1.RELEASE spring cloud Greenwich.M3 spring cloud stream + spring-cloud-stream-binder-rabbit

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error creating bean with name 'rabbitListenerContainerFactory'
RELEASE] Caused by: java.lang.NullPointerException: null at org.springframework.amqp.rabbit.config.AbstractRabbitListenerContainerFactory.
Read more >
Handle NullPointerException in Controller, Service and DAO ...
Overview. In this post, we will see how to use Java 8 Optional class effectively to handle null pointer exception in real time...
Read more >
SpringApplicationTests.java example - Javatips.net
This class describes the usage of SpringApplicationTests.java.
Read more >
RabbitMQ实战篇:消息确认之消费者全局确认 - CSDN博客
//throw new NullPointerException("消息消费失败");. // //当抛出的异常是AmqpRejectAndDontRequeueException异常的时候,则消息会被拒绝, ...
Read more >
Java大蜗牛的个人空间- OSCHINA - 中文开源技术交流社区
... @Import(RabbitAnnotationDrivenConfiguration.class) public class ... 出现异常的代码 System.out.println("hello------1"); }catch (NullPointerException e){ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found