org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.foo.data.repository.RepositoryTest': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.foo.data.repository.UserRepository com.foo.data.repository.RepositoryTest.userRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: No [ManagedType] was found for the key class [com.foo.data.model.User] in the Metamodel - please verify that the [Managed] class was referenced in persistence.xml using a specific <class>com.foo.data.model.User</class> property or a global <exclude-unlisted-classes>false</exclude-unlisted-classes> element.

eclipse.org | 2 months ago
  1. 0

    No [ManagedType] was found for the key class

    Stack Overflow | 2 years ago | Robert Mark Bram
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.foo.data.repository.RepositoryTest': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.foo.data.repository.UserRepository com.foo.data.repository.RepositoryTest.userRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: No [ManagedType] was found for the key class [com.foo.data.model.User] in the Metamodel - please verify that the [Managed] class was referenced in persistence.xml using a specific <class>com.foo.data.model.User</class> property or a global <exclude-unlisted-classes>false</exclude-unlisted-classes> element.
  2. 0

    Eclipse Community Forums: EclipseLink ยป No [ManagedType] was found for the key class.. JPA, H2, EclipseLink, Java Config (no xml)

    eclipse.org | 2 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.foo.data.repository.RepositoryTest': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.foo.data.repository.UserRepository com.foo.data.repository.RepositoryTest.userRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: No [ManagedType] was found for the key class [com.foo.data.model.User] in the Metamodel - please verify that the [Managed] class was referenced in persistence.xml using a specific <class>com.foo.data.model.User</class> property or a global <exclude-unlisted-classes>false</exclude-unlisted-classes> element.
  3. 0

    Configuration JUnit 4 in Spring + eclipse

    Stack Overflow | 3 years ago | kiduxa
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.blah.baseProject.test.LoginTest2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.blah.baseProject.database.DAO.UsuarioDAO com.blah.baseProject.test.LoginTest2.usuarioDao; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.blah.baseProject.database.DAO.UsuarioDAO] 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

    BeanCreationException: Error creating bean with name

    Stack Overflow | 3 years ago | user2770251
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.innovate.notanet.logica.dao.impl.test.ParametroDaoImplTest': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.innovate.notanet.logica.dao.ParametroRepository com.innovate.notanet.logica.dao.impl.test.ParametroDaoImplTest.parametroRepository; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.innovate.notanet.logica.dao.ParametroRepository] 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)}
  6. 0

    Spring 3 and JUnit 4 (autowiring)

    Stack Overflow | 4 years ago | Ritesh
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.test.admin.service.CompensationServiceTest': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.test.admin.service.FundService com.test.admin.service.CompensationServiceTest.fundService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.test.admin.service.FundService] 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)}

  1. marcbouvierdav 8 times, last 3 months ago
  2. Bugger 1 times, last 7 months ago
18 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 'com.foo.data.repository.RepositoryTest': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.foo.data.repository.UserRepository com.foo.data.repository.RepositoryTest.userRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: No [ManagedType] was found for the key class [com.foo.data.model.User] in the Metamodel - please verify that the [Managed] class was referenced in persistence.xml using a specific <class>com.foo.data.model.User</class> property or a global <exclude-unlisted-classes>false</exclude-unlisted-classes> element.

    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues()
  2. Spring Beans
    AbstractAutowireCapableBeanFactory.autowireBeanProperties
    1. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1146)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java:376)
    3 frames
  3. Spring TestContext
    SpringJUnit4ClassRunner$1.runReflectiveCall
    1. org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:110)
    2. org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
    3. org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:312)
    4. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:211)
    5. org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:288)
    5 frames
  4. JUnit
    ReflectiveCallable.run
    1. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    1 frame
  5. Spring TestContext
    SpringJUnit4ClassRunner.runChild
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:284)
    2. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
    3. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88)
    3 frames
  6. JUnit
    ParentRunner$2.evaluate
    1. org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    2. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    3. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    4. org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    5. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    5 frames
  7. Spring TestContext
    RunAfterTestClassCallbacks.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    2. org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
    2 frames
  8. JUnit
    ParentRunner.run
    1. org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    1 frame
  9. Spring TestContext
    SpringJUnit4ClassRunner.run
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
    1 frame
  10. JUnit4 Runner
    JUnit4TestReference.run
    1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    1 frame
  11. JUnit3 Runner
    RemoteTestRunner.main
    1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
    5 frames