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包。

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