org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.laolang.jc.one.repository.EmployeeRepository com.laolang.jc.one.service.EmployeeService.employeeRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeRepository': Cannot resolve reference to bean 'jpaMappingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/data/util/CloseableIterator

oschina.net | 2 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rp and poroszd . Or join the community to write better ones.
  1. 0

    spring data jpa hibernate 整合报 Error creating bean with name 'jpaMappingContext' - 开源中国社区

    oschina.net | 2 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.laolang.jc.one.repository.EmployeeRepository com.laolang.jc.one.service.EmployeeService.employeeRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeRepository': Cannot resolve reference to bean 'jpaMappingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/data/util/CloseableIterator
  2. 0
    samebug tip
    Spring expects that the EntityManagerFactory has to be called "entityManagerFactory". It uses convention over configuration to make it easier to use.
  3. 0
    samebug tip
    Add slf4j dependency to your pom.xml
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    You need to deploy aspectJ (aspectjweaver.jar) together with your application. Add it to your pom.xml
  6. 0
    samebug tip
    Typo in the name of the bean in the beans.xml
    via spring.io

  1. rp 2 times, last 4 months ago
  2. asdasd 2 times, last 7 months ago
  3. Tahir 4 times, last 8 months ago
  4. fima 25 times, last 7 months ago
  5. Shadd518 63 times, last 8 months ago
22 more registered users
17 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 'employeeService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.laolang.jc.one.repository.EmployeeRepository com.laolang.jc.one.service.EmployeeService.employeeRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeRepository': Cannot resolve reference to bean 'jpaMappingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/data/util/CloseableIterator

    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues()
  2. Spring Beans
    AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues
    1. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)[spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE]
    1 frame