org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'simpleMessageListenerContainer' defined in class path resource [org/springframework/cloud/aws/messaging/config/annotation/SqsConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.amazonaws.services.sqs.AmazonSQSAsync]: : No qualifying bean of type [com.amazonaws.services.sqs.AmazonSQSAsync] is defined: expected single matching bean but found 2: amazonSQSAsync,amazonSQS; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.amazonaws.services.sqs.AmazonSQSAsync] is defined: expected single matching bean but found 2: amazonSQSAsync,amazonSQS

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Springs Qualifier error
    via Stack Overflow by user3872094
    ,
  • GitHub comment 1#259929575
    via GitHub by robscully
    ,
  • Problem building from source
    via GitHub by milank75
    ,
    • org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'simpleMessageListenerContainer' defined in class path resource [org/springframework/cloud/aws/messaging/config/annotation/SqsConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.amazonaws.services.sqs.AmazonSQSAsync]: : No qualifying bean of type [com.amazonaws.services.sqs.AmazonSQSAsync] is defined: expected single matching bean but found 2: amazonSQSAsync,amazonSQS; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.amazonaws.services.sqs.AmazonSQSAsync] is defined: expected single matching bean but found 2: amazonSQSAsync,amazonSQS at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:464) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1111) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1006) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93) at sb.aws.sqs.SBSQSMain.main(SBSQSMain.java:14) Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.amazonaws.services.sqs.AmazonSQSAsync] is defined: expected single matching bean but found 2: amazonSQSAsync,amazonSQS at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1054) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:813) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ... 15 more

    Users with the same issue

    tvrmsmith
    tvrmsmith5 times, last one,
    Axelo
    Axelo2 times, last one,
    Andreas Häber
    Andreas Häber12 times, last one,
    iferca
    iferca30 times, last one,
    Hronom
    Hronom2 times, last one,
    16 more bugmates