org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'converter' defined in class path resource [com/my/app/config/CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.convert.CassandraConverter]: Factory method 'converter' threw exception; nested exception is java.lang.IllegalStateException: @Bean method CassandraConfig.mappingContext called as a bean reference for type [org.springframework.data.cassandra.mapping.CassandraMappingContext] but overridden by non-compatible bean instance of type [org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext]. Overriding bean of same name declared in: class path resource [org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataAutoConfiguration.class]

Stack Overflow | arie | 3 months ago
  1. 0

    How to use spring data cassandra & elasticsearch configuration

    Stack Overflow | 3 months ago | arie
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'converter' defined in class path resource [com/my/app/config/CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.convert.CassandraConverter]: Factory method 'converter' threw exception; nested exception is java.lang.IllegalStateException: @Bean method CassandraConfig.mappingContext called as a bean reference for type [org.springframework.data.cassandra.mapping.CassandraMappingContext] but overridden by non-compatible bean instance of type [org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext]. Overriding bean of same name declared in: class path resource [org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataAutoConfiguration.class]
  2. 0

    技術検証2日目 | 男はロマン

    otokoroman.com | 7 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer' defined in class path resource [org/springframework/session/data/redis/config/annotation/web/http/RedisHttpSessionConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
  3. 0

    NoSuchBeanDefinitionException when using AOP

    GitHub | 2 years ago | mhmpl
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'affiliateServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private myapp.api.database.validator.AffiliateValidator myapp.api.service.impl.AffiliateServiceImpl.affiliateValidator; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [myapp.api.database.validator.AffiliateValidator] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    @EnableConfigurationProperties throws NoUniqueBeanDefinitionException

    GitHub | 2 years ago | sddakoty
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private de.spring.test.MyProperties de.spring.test.MyService.props; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [de.spring.test.MyProperties] is defined: expected single matching bean but found 2: myProperties,my.CONFIGURATION_PROPERTIES
  6. 0

    Cannot use XML configuration for Spring Security

    GitHub | 2 years ago | masrawi
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.ManagementSecurityAutoConfiguration$ManagementWebSecurityConfigurerAdapter': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.setObjectPostProcessor(org.springframework.security.config.annotation.ObjectPostProcessor); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.security.config.annotation.ObjectPostProcessor] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}

  1. rlovtangen 2 times, last 2 weeks ago
  2. tvrmsmith 6 times, last 2 weeks ago
  3. kjhdofjosvs 1 times, last 3 weeks ago
  4. Luka 14 times, last 2 months ago
  5. Gregooz 1 times, last 8 months ago
21 more registered users
74 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.springframework.beans.factory.BeanCreationException

    Error creating bean with name 'converter' defined in class path resource [com/my/app/config/CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.convert.CassandraConverter]: Factory method 'converter' threw exception; nested exception is java.lang.IllegalStateException: @Bean method CassandraConfig.mappingContext called as a bean reference for type [org.springframework.data.cassandra.mapping.CassandraMappingContext] but overridden by non-compatible bean instance of type [org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext]. Overriding bean of same name declared in: class path resource [org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataAutoConfiguration.class]

    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod()
  2. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    6. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    7. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    8. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    9. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    10. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    10 frames
  3. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2 frames
  4. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    3. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:313)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    6. org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    6 frames