当前位置: 代码迷 >> Java Web开发 >> Junit测试报错解决方案
  详细解决方案

Junit测试报错解决方案

热度:7473   发布时间:2013-02-25 21:13:11.0
Junit测试报错
使用junit测试报错求解决
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:308)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'activateTablesService': Injection of autowired dependencies failed; 

nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private 

com.supporter.prj.bm.budgeteering.service.BudgeteeringTableService com.supporter.prj.bm.budgeteering.service.ActivateTablesService.budgeteeringTableService; nested 

exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'budgeteeringTableService': Injection of autowired dependencies 

failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private 

com.supporter.prj.bm.budgeteering.service.BudgeteeringTableRecService com.supporter.prj.bm.budgeteering.service.BudgeteeringTableService.budgeteeringTableRecService; 

nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'budgeteeringTableRecService': Injection of autowired 

dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private 

com.supporter.prj.bm.budgeteering.service.BudgeteeringTableService com.supporter.prj.bm.budgeteering.service.BudgeteeringTableRecService.budgeteeringTableService; 

nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V

Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private 

com.supporter.prj.bm.budgeteering.service.BudgeteeringTableService com.supporter.prj.bm.budgeteering.service.ActivateTablesService.budgeteeringTableService; nested 

exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'budgeteeringTableService': Injection of autowired dependencies 

failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private 

com.supporter.prj.bm.budgeteering.service.BudgeteeringTableRecService com.supporter.prj.bm.budgeteering.service.BudgeteeringTableService.budgeteeringTableRecService; 

nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'budgeteeringTableRecService': Injection of autowired 

dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private 

com.supporter.prj.bm.budgeteering.service.BudgeteeringTableService com.supporter.prj.bm.budgeteering.service.BudgeteeringTableRecService.budgeteeringTableService; 

nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject

(AutowiredAnnotationBeanPostProcessor.java:502)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:282)
... 38 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'budgeteeringTableService': Injection of autowired dependencies 

failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private 

com.supporter.prj.bm.budgeteering.service.BudgeteeringTableRecService com.supporter.prj.bm.budgeteering.service.BudgeteeringTableService.budgeteeringTableRecService; 
  相关解决方案