Spring Aop 异常

      Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.config.internalAutoProxyCreator': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean

 

     用Spring3.0.3做测试aop用例时遇到的异常(由于Spring3.0并没有提供aspect相关的jar,于是使用Spring2.0的aspect包),看了N多的网页说是要换成Spring 2.0.8或Spring 2.5.6 aspect包,结果一试还是出异常,最后没办法一个一个jar包添加进去才发现是少了aopalliance.jar包。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章