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

Stack Overflow | magiccrafter | 5 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Kafka 0.9 Spring Integration DSL Configuration

    Stack Overflow | 5 months ago | magiccrafter
    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

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      org.springframework.kafka.listener.adapter.MessagingMessageListenerAdapter.<init>(Ljava/lang/reflect/Method;)V

      at org.springframework.integration.dsl.kafka.Kafka09MessageDrivenChannelAdapter$IntegrationMessageListener.<init>()
    2. org.springframework.integration
      Kafka09.messageDriverChannelAdapter
      1. org.springframework.integration.dsl.kafka.Kafka09MessageDrivenChannelAdapter$IntegrationMessageListener.<init>(Kafka09MessageDrivenChannelAdapter.java:152)[spring-integration-java-dsl-1.2.0.M2.jar:na]
      2. org.springframework.integration.dsl.kafka.Kafka09MessageDrivenChannelAdapter.<init>(Kafka09MessageDrivenChannelAdapter.java:50)[spring-integration-java-dsl-1.2.0.M2.jar:na]
      3. org.springframework.integration.dsl.kafka.Kafka09MessageDrivenChannelAdapterSpec.<init>(Kafka09MessageDrivenChannelAdapterSpec.java:54)[spring-integration-java-dsl-1.2.0.M2.jar:na]
      4. org.springframework.integration.dsl.kafka.Kafka09MessageDrivenChannelAdapterSpec$KafkaMessageDrivenChannelAdapterListenerContainerSpec.<init>(Kafka09MessageDrivenChannelAdapterSpec.java:71)[spring-integration-java-dsl-1.2.0.M2.jar:na]
      5. org.springframework.integration.dsl.kafka.Kafka09.messageDriverChannelAdapter(Kafka09.java:148)[spring-integration-java-dsl-1.2.0.M2.jar:na]
      6. org.springframework.integration.dsl.kafka.Kafka09.messageDriverChannelAdapter(Kafka09.java:123)[spring-integration-java-dsl-1.2.0.M2.jar:na]
      6 frames
    3. demo
      DemoApplication$ConsumerConfiguration$$EnhancerBySpringCGLIB$$845f73e4$$FastClassBySpringCGLIB$$64cb05f3.invoke
      1. demo.DemoApplication$ConsumerConfiguration.consumer(DemoApplication.java:149)[classes/:na]
      2. demo.DemoApplication$ConsumerConfiguration$$EnhancerBySpringCGLIB$$845f73e4.CGLIB$consumer$0(<generated>)[classes/:na]
      3. demo.DemoApplication$ConsumerConfiguration$$EnhancerBySpringCGLIB$$845f73e4$$FastClassBySpringCGLIB$$64cb05f3.invoke(<generated>)[classes/:na]
      3 frames
    4. Spring Core
      MethodProxy.invokeSuper
      1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)[spring-core-4.3.3.RELEASE.jar:4.3.3.RELEASE]
      1 frame
    5. Spring Context
      ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
      1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
      1 frame
    6. demo
      DemoApplication$ConsumerConfiguration$$EnhancerBySpringCGLIB$$845f73e4.consumer
      1. demo.DemoApplication$ConsumerConfiguration$$EnhancerBySpringCGLIB$$845f73e4.consumer(<generated>)[classes/:na]
      1 frame
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_60]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_60]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_60]
      4. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_60]
      4 frames