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:
- Created 5 years ago
- Reactions:5
- Comments:6 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
same issue with spring boot 2.1.1.RELEASE spring cloud Greenwich.M3 spring cloud stream + spring-cloud-stream-binder-rabbit