org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'messageDigest' defined in file [E:\java\factory-method\services-context.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [java.lang.String]: Ambiguous constructor argument types - did you specify the correct bean references as generic constructor arguments?

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

Samebug tips

,
Expert tip

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.

,
Expert tip

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

Solutions on the web

via Spring JIRA by Jing Xue, 1 year ago
Error creating bean with name 'messageDigest' defined in file [E:\java\factory-method\services-context.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [java.lang.String]: Ambiguous constructor argument types - did you specify the correct bean references as generic constructor arguments?
via Spring JIRA by Jing Xue, 1 year ago
Error creating bean with name 'messageDigest' defined in file [E:\java\factory-method\services-context.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [java.lang.String]: Ambiguous constructor argument types - did you specify the correct bean references as generic constructor arguments?
via Spring JIRA by Martin Thompson, 1 year ago
Error creating bean with name 'testId' defined in class path resource [spring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [[B]: Did you specify the correct bean references as generic constructor arguments?
via Spring JIRA by Martin Thompson, 1 year ago
Error creating bean with name 'testId' defined in class path resource [spring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [[B]: Did you specify the correct bean references as generic constructor arguments?
via YouTrack by Unknown author, 1 year ago
Error creating bean with name 'org.intellij.plugins.junit.ClassRefactoringListener' defined in resource loaded through InputStream: Unsatisfied dependency expressed through constructor argument with index 3 of type
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'messageDigest' defined in file [E:\java\factory-method\services-context.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [java.lang.String]: Ambiguous constructor argument types - did you specify the correct bean references as generic constructor arguments?
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createArgumentArray(AbstractAutowireCapableBeanFactory.java:667)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:442)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:314)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:312)
at org.springframework.context.support.FileSystemXmlApplicationContext.(FileSystemXmlApplicationContext.java:82)
at org.springframework.context.support.FileSystemXmlApplicationContext.(FileSystemXmlApplicationContext.java:67)
at undefined.Main.main(Main.java:7)

Users with the same issue

7 times, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

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