org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.foo.MyTests': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.foo.domain.PersonRepository com.foo.MyTests.personRepository; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.foo.domain.Person] is defined: Unsatisfied dependency of type [com.foo.domain.Person]: expected at least 1 matching bean

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

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Spring JIRA by Chris Beams, 1 year ago
Error creating bean with name 'com.foo.MyTests': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.foo.domain.PersonRepository
via Spring JIRA by Chris Beams, 1 year ago
Error creating bean with name 'com.foo.MyTests': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.foo.domain.PersonRepository
via spring.io by Unknown author, 1 year ago
Error creating bean with name 'com.foo.MyTests': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.foo.domain.PersonRepository
via spring.io by Unknown author, 1 year ago
Error creating bean with name 'guestController': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private guest.GuestDao guest.GuestController.guestDao; nested
via Stack Overflow by Edu
, 2 years ago
Error creating bean with name 'jobLauncherController': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: org.springframework.batch.core.launch.JobLauncher
via Atlassian JIRA by TeckEn Yew, 1 year ago
Error creating bean with name 'com.atlassian.greenhopper.web.rapid.RapidBoardAction': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.foo.MyTests': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.foo.domain.PersonRepository com.foo.MyTests.personRepository; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.foo.domain.Person] is defined: Unsatisfied dependency of type [com.foo.domain.Person]: expected at least 1 matching bean

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

Write tip

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