将spring数据jpa与spring batch admin集成时出错

时间:2012-08-10 15:22:47

标签: spring-data-jpa spring-batch-admin

o.s.web.context.ContextLoader  - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productfeedSvc': 
Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field:
private com.dealwallet.productFeed.repository.ProductFeedRepository 
com.dealwallet.productFeed.svc.impl.ProductSvcImpl.productFeedRepository;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productFeedRepository': Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: **org.springframework.transaction.interceptor.TransactionInterceptor.setTransactionManagerBeanName(Ljava/lang/String;)**V
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]

我使用Spring数据jpa和spring batch admin,  我配置了application-context.xml和persistance.xml,  当我在tomcat中运行时,我收到了这个错误。

1 个答案:

答案 0 :(得分:0)

它说auto-wiring有问题。

所以检查这些项目:
- 确保你的班级(使用另一个班级的班级)具有该房产的设定者 - 确保你的类的属性(使用另一个属性的属性)具有其他类bean id的确切名称 - 确保您已启用annotation s。