org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumer' defined in class path resource [demo/DemoApplication$ConsumerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.integration.dsl.IntegrationFlow]: Factory method 'consumer' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.kafka.listener.adapter.MessagingMessageListenerAdapter.<init>(Ljava/lang/reflect/Method;)V

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by magiccrafter
, 1 year ago
Error creating bean with name 'consumer' defined in class path resource [demo/DemoApplication$ConsumerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException
via Stack Overflow by Richard
, 7 months ago
Error creating bean with name 'dataSource' defined in class path resource [com/example/AppConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate
via GitHub by nimtiazm
, 9 months ago
Error creating bean with name 'defaultServletHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested
via Stack Overflow by membersound
, 2 years ago
Error creating bean with name 'getMySoapService' defined in class path resource [PortConfig.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public MySoapService PortConfig.getMySoapService()] threw exception; nested exception is java.lang.NullPointerException
via Stack Overflow by Edward Ng
, 2 years ago
Error creating bean with name 'defaultServletHandlerMapping' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Instantiation of bean failed; nested exception is
via Stack Overflow by mpkorstanje
, 2 years ago
Error creating bean with name 'jobBuilders' defined in class path resource [org/springframework/batch/core/configuration/annotation/ModularBatchConfiguration.class]: Instantiation of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumer' defined in class path resource [demo/DemoApplication$ConsumerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.integration.dsl.IntegrationFlow]: Factory method 'consumer' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.kafka.listener.adapter.MessagingMessageListenerAdapter.<init>(Ljava/lang/reflect/Method;)V
at org.springframework.integration.dsl.kafka.Kafka09MessageDrivenChannelAdapter$IntegrationMessageListener.(Kafka09MessageDrivenChannelAdapter.java:152)
at org.springframework.integration.dsl.kafka.Kafka09MessageDrivenChannelAdapter.(Kafka09MessageDrivenChannelAdapter.java:50)
at org.springframework.integration.dsl.kafka.Kafka09MessageDrivenChannelAdapterSpec.(Kafka09MessageDrivenChannelAdapterSpec.java:54)
at org.springframework.integration.dsl.kafka.Kafka09MessageDrivenChannelAdapterSpec$KafkaMessageDrivenChannelAdapterListenerContainerSpec.(Kafka09MessageDrivenChannelAdapterSpec.java:71)
at org.springframework.integration.dsl.kafka.Kafka09.messageDriverChannelAdapter(Kafka09.java:148)
at org.springframework.integration.dsl.kafka.Kafka09.messageDriverChannelAdapter(Kafka09.java:123)
at demo.DemoApplication$ConsumerConfiguration.consumer(DemoApplication.java:149)
at demo.DemoApplication$ConsumerConfiguration$$EnhancerBySpringCGLIB$$845f73e4.CGLIB$consumer$0()
at demo.DemoApplication$ConsumerConfiguration$$EnhancerBySpringCGLIB$$845f73e4$$FastClassBySpringCGLIB$$64cb05f3.invoke()
at demo.DemoApplication$ConsumerConfiguration$$EnhancerBySpringCGLIB$$845f73e4.consumer()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.