org.springframework.beans.factory.UnsatisfiedDependencyException

Error creating bean with name 'cacheManager' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Unsatisfied dependency expressed through constructor parameter 0: Ambiguous argument values for parameter of type [org.springframework.data.redis.core.RedisOperations] - did you specify the correct bean references as arguments?


Samebug tips2

Springboot auto-configuration is disabled when you try to use WebMvcConfigurerAdapter and @EnableWebMvc. If WebConfig is not of the essence, remove it and use SpringBoot auto-configuration.

If you want to keep using @EnableWebMvc annotation, you have to add the code on the first answer of this page: https://goo.gl/JoHTKU to your code

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.


Solutions on the web1351

Solution icon of stackoverflow
via Stack Overflow by LR07
, 2 months ago
Error creating bean with name 'cacheManager' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Unsatisfied dependency expressed through constructor parameter 0: Ambiguous argument values for parameter of type [org.springframework.data.redis.core.RedisOperations] - did you specify the correct bean references as arguments?

Solution icon of stackoverflow
Error creating bean with name 'cacheManager' defined in class path resource [spring/config/shared-config.xml]: Unsatisfied dependency expressed through constructor parameter 0: Ambiguous argument values for parameter of type [org.springframework.data.redis.core.RedisOperations] - did you specify the correct bean references as arguments?

Solution icon of web
via spring.io by Unknown author, 1 year ago
Error creating bean with name 'password' defined in ServletContext resource [/WEB-INF/application-context.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.StringBuilder]: Ambiguous constructor argument types - did you specify the correct bean references as constructor arguments?

Solution icon of kuali
via Kuali JIRA by Kyle Campos, 1 year ago
Error creating bean with name 'metadataServiceImpl' defined in class path resource [core-gwt-context.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [org.kuali.student.core.dictionary.service.old.DictionaryService[]]: Ambiguous constructor argument types - did you specify the correct bean references as constructor arguments?

Solution icon of kuali
via Kuali JIRA by Kyle Campos, 1 year ago
Error creating bean with name 'metadataServiceImpl' defined in class path resource [core-gwt-context.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [org.kuali.student.core.dictionary.service.old.DictionaryService[]]: Ambiguous constructor argument types - did you specify the correct bean references as constructor arguments?

Solution icon of web
via sourceforge.net by Unknown author, 1 year ago
Error creating bean with name 'hibernate' defined in ServletContext resource : Unsatisfied dependency expressed through constructor argument with index 1 of type : Ambiguous constructor argument types - did you specify the correct bean references as constructor arguments?

Solution icon of coderanch
via Coderanch by Tony Evans, 7 months ago
Error creating bean with name 'timeOut' defined in class path resource [ce-priceavailability-wrapper.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [long]: Ambiguous constructor argument types - did you specify the correct bean references as constructor arguments?

Solution icon of spring
via Spring JIRA by Grzegorz Rozniecki, 7 months ago
Error creating bean with name 'brokenSupplier' defined in class path resource [brokenContext.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.Object]: Ambiguous factory method argument types - did you specify the correct bean references as factory method arguments?

Solution icon of stackoverflow
via Stack Overflow by scphantm
, 1 year ago
Error creating bean with name 'graphDatabaseService' defined in class path resource [applicationContext.xml]: Unsatisfied dependency expressed through constructor argument with index 2 of type [java.lang.Iterable]: Ambiguous constructor argument types - did you specify the correct bean references as constructor arguments?

Solution icon of stackoverflow
Error creating bean with name 'graphDatabaseService' defined in ServletContext resource [/WEB-INF/mvc-dispatcher-servlet.xml]: Unsatisfied dependency expressed through constructor argument with index 2 of type [java.lang.Iterable]: Ambiguous constructor argument types - did you specify the correct bean references as constructor arguments?

Stack trace

  • org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cacheManager' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Unsatisfied dependency expressed through constructor parameter 0: Ambiguous argument values for parameter of type [org.springframework.data.redis.core.RedisOperations] - did you specify the correct bean references as arguments? at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:736) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1481) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 9 months ago
Samebug visitor profile picture
Unknown user
Once, 11 months ago
42 more bugmates